mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Add manual irq line check for the int task for PD
This commit is contained in:
@@ -8,5 +8,6 @@
|
||||
#ifndef USER_BSP_PD_H_
|
||||
#define USER_BSP_PD_H_
|
||||
#include "BSP.h"
|
||||
bool getFUS302IRQLow(); // Return true if the IRQ line is still held low
|
||||
|
||||
#endif /* USER_BSP_PD_H_ */
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "IRQ.h"
|
||||
#include "Pins.h"
|
||||
#include "int_n.h"
|
||||
|
||||
/*
|
||||
* Catch the IRQ that says that the conversion is done on the temperature
|
||||
* readings coming in Once these have come in we can unblock the PID so that it
|
||||
@@ -32,3 +34,8 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
|
||||
(void)GPIO_Pin;
|
||||
InterruptHandler::irqCallback();
|
||||
}
|
||||
|
||||
bool getFUS302IRQLow() {
|
||||
// Return true if the IRQ line is still held low
|
||||
return HAL_GPIO_ReadPin(INT_PD_GPIO_Port, INT_PD_Pin) == GPIO_PIN_RESET;
|
||||
}
|
||||
@@ -118,6 +118,10 @@ void EXTI5_9_IRQHandler(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
bool getFUS302IRQLow() {
|
||||
// Return true if the IRQ line is still held low
|
||||
return (RESET == gpio_input_bit_get(FUSB302_IRQ_GPIO_Port, FUSB302_IRQ_Pin));
|
||||
}
|
||||
// These are unused for now
|
||||
void I2C0_EV_IRQHandler(void) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user