我有这个问题, 我有STM32 Nucleo L152RE和Shield SIM 900, 现在,如果我写这个简单的线程一切正常,
ORDER BY date_added
' 当我打电话给AT commnad时,我看到了正确答案。 现在我创建这个缓冲区
'static THD_WORKING_AREA(waRead, 128);
static THD_FUNCTION(Thread,arg) {
(void)arg;
chRegSetThreadName("th_callback");
while (TRUE){
/* This will wait for a character to be received */
uint8_t c = sdGet(&SD1); //questo prende il carattere
sdPut(&SD2, c); // questo lo spara alla terminale
}
}
我用这个帖子来存储答案
'static uint8_t bufferMsg[128];'
这个线程没有工作,也没有存储答案,你能帮帮我吗?
最好的问候 甲答案 0 :(得分:0)
我使用,
定义
select owner_obj_id,
ddr_medium_id,
case when count(ddr_medium_id)>1 then 'Duplicate' else 'Unique' END As Dup_Check
from yourable
group by owner_obj_id,ddr_medium_id
功能
#define buffer_size 128
char buffer[buffer_size + 1];
int nbytes = 0;
主要
void SIM_callback(){ /* GSM900 Serial */
char x = SIM.getc();
buffer[nbytes] = x;
nbytes++; if (nbytes > buffer_size) nbytes = buffer_size;
buffer[nbytes] = '\0';
}