Hi, I'm working on an implementation for another MCU and I have some questions/ suggestions.
- How do you plan to differentiate between the MCU implenentations because you can only one in
ApiMcu.h? I propose to use a symbol?
- The code to write to SPI you propose does not seem to work for me, we use:
uint8_t rxDat;
if (HAL_SPI_TransmitReceive(&hspi1, (uint8_t *) &outval, (uint8_t *) &rxDat,
1, HAL_MAX_DELAY) == HAL_OK) {
//DBG_PRINTF("HAL RX DAT: %u\n", rxDat);hspi1
return rxDat;
}
Why are you using the low level functions for SPI but not the other peripherials?
I think just using HAL is just fine.
wait_ms() is used in sx1276.cpp but not defined in the API.
- mbed.h should only be included if a symbol
MBED for example is set
- extern Serial pcf is also not compatible to any environment and should be put behind a symbol
- void SX126x::WriteCommand should return the as it is needed for commands like
GET_DEVICE_ERRORS
Hi, I'm working on an implementation for another MCU and I have some questions/ suggestions.
ApiMcu.h? I propose to use a symbol?Why are you using the low level functions for SPI but not the other peripherials?
I think just using HAL is just fine.
wait_ms()is used insx1276.cppbut not defined in the API.MBEDfor example is setGET_DEVICE_ERRORS