Skip to content

Commit

Permalink
fix: fix spi address16 bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
libdriver committed Mar 7, 2023
1 parent 02d9a52 commit 368c345
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion project/raspberrypi4b/interface/src/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ uint8_t spi_write_address16(int fd, uint16_t reg, uint8_t *buf, uint16_t len)
/* set the command */
command[0] = (reg >> 8) & 0xFF;
command[1] = reg & 0xFF;
memset(&command[2], 0x00, len);
memcpy(&command[2], buf, len);

/* clear ioc transfer */
memset(&k, 0, sizeof(struct spi_ioc_transfer));
Expand Down

0 comments on commit 368c345

Please sign in to comment.