gcc和mdk都能编译成功

This commit is contained in:
andy
2023-11-01 23:51:19 +08:00
parent ddeec88a89
commit 17729e664f
17 changed files with 563 additions and 27 deletions

View File

@@ -124,10 +124,17 @@ int tran_get_busy(tran_def *t)
static ucport_item *cmd_find(const char *codec_name,uint8_t cmd)
{
#if defined (__CC_ARM)
extern const int transtruct$$Base;
extern const int transtruct$$Limit;
ucport_item *start=(ucport_item *)&transtruct$$Base;
ucport_item *end=(ucport_item *)&transtruct$$Limit;
#else
extern const int __start_transtruct;
extern const int __stop_transtruct;
ucport_item *start=(ucport_item *)&__start_transtruct;
ucport_item *end=(ucport_item *)&__stop_transtruct;
#endif
for(ucport_item *t=start;t<end;t++)
{
if((t->cmd==cmd)&&(strcmp(t->codec_name,codec_name)==0))