NetBurner 3.5.0
PDF Version
 
device.h
Go to the documentation of this file.
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
17#ifndef _DEVICE_H
18#define _DEVICE_H
19#include <nbrtos.h>
20
21/* Constants */
22
24#define DEVICE_INTERRUPT_MAXIMUM (8)
25
26/* Enumerations */
27
39
40/* Routine Prototypes */
41
43typedef void(DeviceIsrFn)();
44typedef DeviceIsrFn *DeviceIsrFnPtr;
45
52BOOL DeviceIsValid(int irq);
53
61BOOL DeviceSetupIsr(int irq, DeviceInterruptTrigger trigger, DeviceIsrFnPtr isrPtr);
62
66void DeviceAckInterrupt(int irq);
67
72
77
78/* Runtime Libraries Routine Prototypes */
79
85
91
92#endif /* _DEVICE_H */
93
94
_DeviceInterruptTrigger
DeviceSetupIsr interrupt trigger.
Definition device.h:31
enum _DeviceInterruptTrigger DeviceInterruptTrigger
DeviceSetupIsr interrupt trigger.
void DeviceIsrFn()
ISR function.
Definition device.h:43
void DeviceDisableInterrupt(int irq)
Disable interrupt.
OS_SEM * DeviceGetQspiSem(void)
Acquire QSPI semaphore for sharing access to SPI devices.
BOOL DeviceIsValid(int irq)
Verify availability and support for device. (Only verifies IRQ is valid)
OS_SEM * DeviceGetI2cSem(void)
Acquire I2C semaphore for sharing access to I2C devices.
void DeviceAckInterrupt(int irq)
Acknowledge interrupt.
BOOL DeviceSetupIsr(int irq, DeviceInterruptTrigger trigger, DeviceIsrFnPtr isrPtr)
Set interrupt controller and attach function to interrupt.
void DeviceEnableInterrupt(int irq)
Enable interrupt.
@ InterruptTriggerNone
No interrupt level.
Definition device.h:32
@ InterruptTriggerBothEdge
Both rising and falling edge triggered.
Definition device.h:36
@ InterruptTriggerRisingEdge
Rising edge triggered interrupt.
Definition device.h:34
@ InterruptTriggerFallingEdge
Falling edge triggered interrupt.
Definition device.h:35
@ InterruptTriggerSensitive
Trigger-sensitive interrupt.
Definition device.h:33
NetBurner Real-Time Operating System (NBRTOS) API.
Semaphores are used to control access to shared resources or or to communicate between tasks in a mul...
Definition nbrtos.h:386