New lf rfid (#342)

* invert inputs
* move RFID RX to IRQ, unstable
* remove critical blink
* supress short carrier, decrease queue
* migrate to stream buffer
* enable state change
* conditions build for invert RFID IN
* move get_rfid_in_level
* use hal function for get comp level, remove duplicate interrupt registration, interrupt unregister on exit
* reinit comparator context on mode change
This commit is contained in:
coreglitch
2021-03-02 13:17:27 +03:00
committed by GitHub
parent 1af3463897
commit 056e6ffa9c
7 changed files with 174 additions and 85 deletions

View File

@@ -144,7 +144,8 @@ void CyfralReaderComp::comparator_trigger_callback(void* hcomp, void* comp_ctx)
if(_this->ready_to_process == false) {
// send event to queue
CompEvent event;
event.value = (HAL_COMP_GetOutputLevel(_hcomp) == COMP_OUTPUT_LEVEL_HIGH);
// TOOD F4 and F5 differ
event.value = (HAL_COMP_GetOutputLevel(_hcomp) == COMP_OUTPUT_LEVEL_LOW);
event.dwt_value = DWT->CYCCNT;
osStatus_t status = osMessageQueuePut(_this->comp_event_queue, &event, 0, 0);