command: Prefer uint8_t* for buffers; prefer uint8_fast_t for lengths
Prefer using 'uint8_t' buffers as it is too easy to run into C sign extension problems with 'char' buffers. Prefer using 'uint_fast8_t' for buffer lengths as gcc does a better job compiling them on 32bit mcus. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
// Layout of shared memory
|
||||
struct shared_response_buffer {
|
||||
uint32_t count;
|
||||
char data[MESSAGE_MAX];
|
||||
uint8_t data[MESSAGE_MAX];
|
||||
};
|
||||
struct shared_mem {
|
||||
uint32_t signal;
|
||||
@@ -36,7 +36,7 @@ struct shared_mem {
|
||||
const struct command_parser *command_index;
|
||||
uint32_t command_index_size;
|
||||
const struct command_parser *shutdown_handler;
|
||||
char read_data[512];
|
||||
uint8_t read_data[512];
|
||||
};
|
||||
|
||||
#define SIGNAL_PRU0_WAITING 0xefefefef
|
||||
|
||||
Reference in New Issue
Block a user