mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
sched_note: change uint32_t nbi_module into uint8_t array, because variables keep the same style that use uint8_t array
sched_note: add note dump module tag definitions
NOTE_MODULE(a, b, c, d)
example:
define TEST_MODULE NOTE_MODULE('t', 'e', 's', 't')
sched_note_dump(TEST_MODULE, event, data, len);
define AUDIO_MODULE NOTE_MODULE('a', 'u', 'd', 'i')
sched_note_dump(AUDIO_MODULE, event, data, len);
This commit is contained in:
@@ -864,7 +864,10 @@ void sched_note_dump(uint32_t module, uint8_t event,
|
||||
note_common(tcb, ¬e->nbi_cmn, length,
|
||||
NOTE_DUMP_BINARY);
|
||||
|
||||
note->nbi_module = module;
|
||||
note->nbi_module[0] = (uint8_t)(module & 0xff);
|
||||
note->nbi_module[1] = (uint8_t)((module >> 8) & 0xff);
|
||||
note->nbi_module[2] = (uint8_t)((module >> 16) & 0xff);
|
||||
note->nbi_module[3] = (uint8_t)((module >> 24) & 0xff);
|
||||
note->nbi_event = event;
|
||||
memcpy(note->nbi_data, buf, length - sizeof(struct note_binary_s) + 1);
|
||||
|
||||
@@ -1100,7 +1103,10 @@ void sched_note_vbprintf(uint32_t module, uint8_t event,
|
||||
note_common(tcb, ¬e->nbi_cmn, length,
|
||||
NOTE_DUMP_BINARY);
|
||||
|
||||
note->nbi_module = module;
|
||||
note->nbi_module[0] = (uint8_t)(module & 0xff);
|
||||
note->nbi_module[1] = (uint8_t)((module >> 8) & 0xff);
|
||||
note->nbi_module[2] = (uint8_t)((module >> 16) & 0xff);
|
||||
note->nbi_module[3] = (uint8_t)((module >> 24) & 0xff);
|
||||
note->nbi_event = event;
|
||||
|
||||
/* Add the note to circular buffer */
|
||||
|
||||
Reference in New Issue
Block a user