mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-25 15:41:00 +00:00
stm32-sx1280: add buffer write/read check on startup
This commit is contained in:
parent
2fd737d36a
commit
2acaaa65ac
@ -791,6 +791,7 @@ void ll_init(void){
|
||||
}
|
||||
|
||||
void ll_radio_on(void){
|
||||
|
||||
Radio.Init( (RadioCallbacks_t *) &Callbacks );
|
||||
Radio.SetRegulatorMode( USE_DCDC ); // Can also be set in LDO mode but consume more power
|
||||
Radio.SetInterruptMode( );
|
||||
@ -811,6 +812,17 @@ void ll_radio_on(void){
|
||||
// Go back to Frequcency Synthesis Mode, reduces transition time between Rx<->TX
|
||||
Radio.SetAutoFS(1);
|
||||
|
||||
// quick test
|
||||
uint8_t data[] = { 1, 2, 4, 8, 16, 32, 64, 128 };
|
||||
Radio.WriteBuffer(0, data, sizeof(data));
|
||||
uint8_t check[8];
|
||||
Radio.ReadBuffer(0, check, sizeof(data));
|
||||
if (memcmp(data, check, sizeof(data)) != 0){
|
||||
printf_hexdump(data, sizeof(data));
|
||||
printf_hexdump(check, sizeof(data));
|
||||
btstack_assert(false);
|
||||
}
|
||||
|
||||
ll_state = LL_STATE_STANDBY;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user