git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11355 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
eecc433c7f
commit
ade8ceca08
|
@ -80,8 +80,10 @@ static THD_FUNCTION(DummyTrustedService, arg) {
|
|||
svcp = (smc_service_t *)smc_hdl->objp;
|
||||
while (true) {
|
||||
m = smcServiceWaitRequest(svcp);
|
||||
if (m == MSG_OK) {
|
||||
if (m == MSG_OK && svcp->svc_datalen > 0) {
|
||||
*((char *)svcp->svc_data + svcp->svc_datalen) = '\0';
|
||||
chprintf((BaseSequentialStream*)&SD1, (char *)svcp->svc_data);
|
||||
chprintf((BaseSequentialStream*)&SD1, "\r\n");
|
||||
}
|
||||
chThdSleepMilliseconds(500);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue