command: Don't pass max_size to command_encodef()
The command_encodef() can read the max_size parameter directly from the 'struct command_encoder' passed into it. Also, there is no need to check that a message will fit in a buffer if the buffer is declared to be MESSAGE_MAX in size. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// Local definitions for PRU code
|
||||
|
||||
#include <stdint.h> // uint32_t
|
||||
#include "command.h" // MESSAGE_MAX
|
||||
|
||||
#define IEP_EVENT 7
|
||||
#define KICK_ARM_EVENT 16
|
||||
@@ -24,7 +25,7 @@
|
||||
// Layout of shared memory
|
||||
struct shared_response_buffer {
|
||||
uint32_t count;
|
||||
char data[64];
|
||||
char data[MESSAGE_MAX];
|
||||
};
|
||||
struct shared_mem {
|
||||
uint32_t signal;
|
||||
|
||||
Reference in New Issue
Block a user