[FL-1009, FL-1118] Better initialization sequence and V8 hardware support (#406)
* Interrupt manager: add memory barriers. * ISRs: remove TIM17 dead code. * API HAL Delay: rename initialization routine and move to API-HAL * Main: move FURI initialization to the start. * API HAL GPIO: drop CC1101 shenanigans, COMP inversion for new boards. * IButton: migrate Cyfral and Metakom to RFID comp routine, make it compatible with new boards. * RFID: Better keyboard handling and shutdown routines
This commit is contained in:
@@ -137,17 +137,12 @@ void KeyReader::stop_comaparator(void) {
|
||||
}
|
||||
|
||||
void KeyReader::comparator_trigger_callback(void* hcomp, void* comp_ctx) {
|
||||
COMP_HandleTypeDef* _hcomp = static_cast<COMP_HandleTypeDef*>(hcomp);
|
||||
KeyReader* _this = static_cast<KeyReader*>(comp_ctx);
|
||||
|
||||
if(hcomp == &hcomp1) {
|
||||
_this->cyfral_decoder.process_front(
|
||||
(HAL_COMP_GetOutputLevel(_hcomp) == COMP_OUTPUT_LEVEL_HIGH),
|
||||
DWT->CYCCNT - last_dwt_value);
|
||||
_this->cyfral_decoder.process_front(get_rfid_in_level(), DWT->CYCCNT - last_dwt_value);
|
||||
|
||||
_this->metakom_decoder.process_front(
|
||||
(HAL_COMP_GetOutputLevel(_hcomp) == COMP_OUTPUT_LEVEL_HIGH),
|
||||
DWT->CYCCNT - last_dwt_value);
|
||||
_this->metakom_decoder.process_front(get_rfid_in_level(), DWT->CYCCNT - last_dwt_value);
|
||||
|
||||
last_dwt_value = DWT->CYCCNT;
|
||||
}
|
||||
|
Reference in New Issue
Block a user