STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
board_exti.h
Go to the documentation of this file.
1
#ifndef STAR_BOARD_EXTI_H
2
#define STAR_BOARD_EXTI_H
3
4
/*
5
* Interrupt pins -> tasks. Each enabled EXTI line (see the .ioc) is routed to
6
* the task that owns the chip:
7
*
8
* PD0 IMU_INT1 ISM330DHCX data ready (rising) -> sensors task
9
* PD3 ACCEL_INT_1 H3LIS100DL data ready (rising) -> sensors task
10
* PB2 RADIO_DIO1 SX1262 IRQ (rising) -> radio task
11
* PE15 ETH_INT W5500 INTn (falling, active low) -> ethernet task
12
*
13
* The ISR only stamps the edge time (board_time_us) and sets the task's
14
* thread flags; all bus traffic happens in the task.
15
*/
16
17
#include <stdbool.h>
18
#include <stdint.h>
19
20
#include "
cmsis_os2.h
"
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
26
/* Call from the owning task before enabling the chip's interrupt output.
27
* Returns false for a pin that is not an EXTI pin on this board. */
28
bool
board_exti_route
(uint16_t pin,
osThreadId_t
thread
, uint32_t flags);
29
30
/* board_time_us() of the most recent edge on pin (0 before the first). */
31
uint32_t
board_exti_last_us
(uint16_t pin);
32
33
#ifdef __cplusplus
34
}
35
#endif
36
#endif
board_exti_route
bool board_exti_route(uint16_t pin, osThreadId_t thread, uint32_t flags)
Definition
board_exti.c:29
board_exti_last_us
uint32_t board_exti_last_us(uint16_t pin)
Definition
board_exti.c:39
cmsis_os2.h
osThreadId_t
void * osThreadId_t
Definition
cmsis_os2.h:211
thread
static osThreadId_t thread
Definition
gnss_task.c:13
firmware
Flight_Computer
src
board
board_exti.h
Generated by
1.15.0