This commit is contained in:
lmx
2025-11-25 14:24:28 +08:00
parent 8f94aaaa17
commit 0405cfe2a7
2 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,7 @@
"xtell.h": "c", "xtell.h": "c",
"debug.h": "c", "debug.h": "c",
"ano_protocol.h": "c", "ano_protocol.h": "c",
"board_jl701n_demo_global_build_cfg.h": "c" "board_jl701n_demo_global_build_cfg.h": "c",
"spi.h": "c"
} }
} }

View File

@ -134,6 +134,7 @@ unsigned char GetReg(unsigned char address, unsigned char *reg_data){
*/ */
unsigned char SetReg(unsigned char address, unsigned char reg_data){ unsigned char SetReg(unsigned char address, unsigned char reg_data){
unsigned char spi_data = (address << 1) & 0xFE; unsigned char spi_data = (address << 1) & 0xFE;
if(spi_send_byte(SPI1, spi_data) != 0){ if(spi_send_byte(SPI1, spi_data) != 0){
xlog("SetReg error 0\n"); xlog("SetReg error 0\n");
return FAIL; return FAIL;