Landtiger LPC1768 C BigLib 1
A self made, custom C library for the LandTiger board.
 
Loading...
Searching...
No Matches
rit.h
Go to the documentation of this file.
1#ifndef __RIT_H
2#define __RIT_H
3
4#include "allocator.h"
5#include "rit_types.h"
6#include "types.h"
7
8#include <stdbool.h>
9
18RIT_Error RIT_Init(MEM_Allocator *const alloc, u32 ival_ms, u16 int_priority);
19
21void RIT_Deinit(void);
22
24void RIT_Enable(void);
25
27void RIT_Disable(void);
28
30bool RIT_IsEnabled(void);
31
34
35// JOBS HANDLING
36
39
42
51RIT_Error RIT_AddJob(RIT_Job job, u8 multiplier_factor);
52
56
59
64
69RIT_Error RIT_SetJobMultiplierFactor(RIT_Job job, u8 multiplier_factor);
70
72void RIT_ClearJobs(void);
73
74#endif
RIT_Error RIT_DisableJob(RIT_Job job)
Exclude this job from the RIT handler queue.
Definition rit_job.c:85
RIT_Error RIT_EnableJob(RIT_Job job)
Include this job in the RIT handler queue.
Definition rit_job.c:65
u32 RIT_GetJobsCount(void)
Returns the number of jobs in the job queue.
Definition rit_job.c:138
RIT_Error RIT_SetJobMultiplierFactor(RIT_Job job, u8 multiplier_factor)
Sets the multiplier factor for the given job.
Definition rit_job.c:153
void RIT_ClearJobs(void)
Clears the job queue.
Definition rit_job.c:175
RIT_Error RIT_RemoveJob(RIT_Job job)
Removes a job from the RIT interrupt handler job queue.
Definition rit_job.c:117
u8 RIT_GetJobMultiplierFactor(RIT_Job job)
Returns the multiplier factor for the given job.
Definition rit_job.c:143
RIT_Error RIT_AddJob(RIT_Job job, u8 multiplier_factor)
Definition rit_job.c:104
void RIT_Deinit(void)
De-initializes the RIT, by removing every job and disconnecting power.
Definition rit.c:43
void RIT_Disable(void)
Disables the RIT entirely (stops counting).
Definition rit.c:55
bool RIT_IsEnabled(void)
Returns whether the RIT is counting or not.
Definition rit.c:60
void RIT_Enable(void)
Enables the RIT counting.
Definition rit.c:50
RIT_Error RIT_Init(MEM_Allocator *const alloc, u32 ival_ms, u16 int_priority)
Initialize the RIT.
Definition rit.c:15
u32 RIT_GetIntervalMs(void)
Returns the interval in millis that RIT uses for its interrupts.
Definition rit.c:65
void(* RIT_Job)(void)
RIT interrupt function pointer for jobs that need to be executed in the RIT interrupt handler.
Definition rit_types.h:38
RIT_Error
Definition rit_types.h:11
uint8_t u8
Definition types.h:8
uint16_t u16
Definition types.h:7
uint32_t u32
Definition types.h:6