NetBurner 3.5.8
PDF Version
Toggle main menu visibility
device.h
1
/*NB_REVISION*/
2
3
/*NB_COPYRIGHT*/
4
9
16
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
30
typedef
enum
_DeviceInterruptTrigger
31
{
32
InterruptTriggerNone
,
33
InterruptTriggerSensitive
,
34
InterruptTriggerRisingEdge
,
35
InterruptTriggerFallingEdge
,
36
InterruptTriggerBothEdge
37
38
} DeviceInterruptTrigger;
39
40
/* Routine Prototypes */
41
43
typedef
void(
DeviceIsrFn
)();
44
typedef
DeviceIsrFn
*DeviceIsrFnPtr;
45
52
BOOL
DeviceIsValid
(
int
irq);
53
61
BOOL
DeviceSetupIsr
(
int
irq, DeviceInterruptTrigger trigger, DeviceIsrFnPtr isrPtr);
62
66
void
DeviceAckInterrupt
(
int
irq);
67
71
void
DeviceDisableInterrupt
(
int
irq);
72
76
void
DeviceEnableInterrupt
(
int
irq);
77
78
/* Runtime Libraries Routine Prototypes */
79
84
OS_SEM
*
DeviceGetQspiSem
(
void
);
85
90
OS_SEM
*
DeviceGetI2cSem
(
void
);
91
92
#endif
/* _DEVICE_H */
93
_DeviceInterruptTrigger
_DeviceInterruptTrigger
DeviceSetupIsr interrupt trigger.
Definition
device.h:31
DeviceIsrFn
void DeviceIsrFn()
ISR function.
Definition
device.h:43
DeviceDisableInterrupt
void DeviceDisableInterrupt(int irq)
Disable interrupt.
DeviceGetQspiSem
OS_SEM * DeviceGetQspiSem(void)
Acquire QSPI semaphore for sharing access to SPI devices.
DeviceIsValid
BOOL DeviceIsValid(int irq)
Verify availability and support for device. (Only verifies IRQ is valid).
DeviceGetI2cSem
OS_SEM * DeviceGetI2cSem(void)
Acquire I2C semaphore for sharing access to I2C devices.
DeviceAckInterrupt
void DeviceAckInterrupt(int irq)
Acknowledge interrupt.
DeviceSetupIsr
BOOL DeviceSetupIsr(int irq, DeviceInterruptTrigger trigger, DeviceIsrFnPtr isrPtr)
Set interrupt controller and attach function to interrupt.
DeviceEnableInterrupt
void DeviceEnableInterrupt(int irq)
Enable interrupt.
InterruptTriggerNone
@ InterruptTriggerNone
No interrupt level.
Definition
device.h:32
InterruptTriggerBothEdge
@ InterruptTriggerBothEdge
Both rising and falling edge triggered.
Definition
device.h:36
InterruptTriggerRisingEdge
@ InterruptTriggerRisingEdge
Rising edge triggered interrupt.
Definition
device.h:34
InterruptTriggerFallingEdge
@ InterruptTriggerFallingEdge
Falling edge triggered interrupt.
Definition
device.h:35
InterruptTriggerSensitive
@ InterruptTriggerSensitive
Trigger-sensitive interrupt.
Definition
device.h:33
OS_SEM
Semaphores are used to control access to shared resources or or to communicate between tasks in a mul...
Definition
nbrtos.h:407
nbrtos
include
device.h
Generated by
1.18.0