Merge branch 'ofw-dev' into xfw-dev

This commit is contained in:
Willy-JL
2024-01-18 02:32:35 +00:00
85 changed files with 4746 additions and 977 deletions
+14
View File
@@ -78,6 +78,20 @@ CC1101Status cc1101_get_status(FuriHalSpiBusHandle* handle) {
return cc1101_strobe(handle, CC1101_STROBE_SNOP);
}
bool cc1101_wait_status_state(FuriHalSpiBusHandle* handle, CC1101State state, uint32_t timeout_us) {
bool result = false;
CC1101Status status = {0};
FuriHalCortexTimer timer = furi_hal_cortex_timer_get(timeout_us);
while(!furi_hal_cortex_timer_is_expired(timer)) {
status = cc1101_strobe(handle, CC1101_STROBE_SNOP);
if(status.STATE == state) {
result = true;
break;
}
}
return result;
}
CC1101Status cc1101_shutdown(FuriHalSpiBusHandle* handle) {
return cc1101_strobe(handle, CC1101_STROBE_SPWD);
}
+10
View File
@@ -59,6 +59,16 @@ CC1101Status cc1101_reset(FuriHalSpiBusHandle* handle);
*/
CC1101Status cc1101_get_status(FuriHalSpiBusHandle* handle);
/** Wait specific chip state
*
* @param handle The SPI bus handle
* @param[in] state The state to wait
* @param[in] timeout_us The timeout in microseconds
*
* @return true on success, false otherwise
*/
bool cc1101_wait_status_state(FuriHalSpiBusHandle* handle, CC1101State state, uint32_t timeout_us);
/** Enable shutdown mode
*
* @param handle - pointer to FuriHalSpiHandle