Skip to content

Commit

Permalink
Parameter 'req' can be declared as pointer to const [constParameterPo…
Browse files Browse the repository at this point in the history
…inter]

int comms_control_handler(ControlPacket_t *req, uint8_t *resp)
/home/dzid_/openpilot/panda/board/flasher.h:7:44: style
  • Loading branch information
dzid26 committed Jun 6, 2024
1 parent 7442f78 commit 8d31590
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion board/comms_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ typedef struct {
uint16_t length;
} __attribute__((packed)) ControlPacket_t;

int comms_control_handler(ControlPacket_t *req, uint8_t *resp);
int comms_control_handler(const ControlPacket_t *req, uint8_t *resp);
void comms_endpoint2_write(const uint8_t *data, uint32_t len);
void comms_can_write(const uint8_t *data, uint32_t len);
uint32_t comms_can_read(uint8_t *data, uint32_t max_len);
Expand Down
2 changes: 1 addition & 1 deletion board/flasher.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ bool unlocked = false;

void spi_init(void);

int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
int comms_control_handler(const ControlPacket_t *req, uint8_t *resp) {
int resp_len = 0;

// flasher machine
Expand Down
2 changes: 1 addition & 1 deletion board/jungle/main_comms.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void comms_endpoint2_write(const uint8_t *data, uint32_t len) {
UNUSED(len);
}

int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
int comms_control_handler(const ControlPacket_t *req, uint8_t *resp) {
unsigned int resp_len = 0;
uint32_t time;

Expand Down
2 changes: 1 addition & 1 deletion board/main_comms.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void comms_endpoint2_write(const uint8_t *data, uint32_t len) {
}
}

int comms_control_handler(ControlPacket_t *req, uint8_t *resp) {
int comms_control_handler(const ControlPacket_t *req, uint8_t *resp) {
unsigned int resp_len = 0;
uart_ring *ur = NULL;
uint32_t time;
Expand Down

0 comments on commit 8d31590

Please sign in to comment.