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:
@@ -51,3 +51,13 @@ void enable_cc1101_irq() {
|
||||
HAL_NVIC_SetPriority(EXTI4_IRQn, 5, 0);
|
||||
HAL_NVIC_EnableIRQ(EXTI4_IRQn);
|
||||
}
|
||||
|
||||
extern COMP_HandleTypeDef hcomp1;
|
||||
|
||||
bool get_rfid_in_level() {
|
||||
#ifdef INVERT_RFID_IN
|
||||
return (HAL_COMP_GetOutputLevel(&hcomp1) == COMP_OUTPUT_LEVEL_LOW);
|
||||
#else
|
||||
return (HAL_COMP_GetOutputLevel(&hcomp1) == COMP_OUTPUT_LEVEL_HIGH);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user