20 volatile static int _nanoDoneTaskId = -1;
22 bool nanoConfig(uint32_t delay, uint32_t period, uint32_t width, uint32_t noOfPulses)
26 NANOB->PERIOD = period;
28 NANOB->COUNT = noOfPulses;
35 _nanoDoneTaskId = taskId;
39 if (_nanoDoneTaskId >= 0)
schdRunIRQ(_nanoDoneTaskId);
void nanoSetPulseDoneTask(int taskId)
Configures the task to run if a pulse is done.
Defines the configuration of the LM32 SOC for the CLBv2.
bool nanoConfig(uint32_t delay, uint32_t period, uint32_t width, uint32_t noOfPulses)
Configures the nano-beacon.
Low level routines for LM32, including interrupt handling.
Simple task scheduler for tasks.
#define NANOB
Nano-Beacon device.
#define IRQ_HANDLER(IRQ)
Defines an IRQ handler.
#define E_INVARGUMENT
Generic error: invalid argument.
void schdRunIRQ(int taskId)
Schedule a task from an IRQ.
bool errSet(uint32_t code, const char *error, const char *name)
Sets an error.
#define ERROR(CODE,...)
Expands an error code to an error code with a description (if ERROR_W_DESCR is declared).