LMA
Lightweight Metrology for AC
Loading...
Searching...
No Matches
LMA_Port.h
Go to the documentation of this file.
1
17
18#ifndef _LMA_PORT_H
19#define _LMA_PORT_H
20
21#include "LMA_Types.h"
22
26#define LMA_CRITICAL_SECTION_PREPARE()
27
31#define LMA_CRITICAL_SECTION_ENTER()
32
36#define LMA_CRITICAL_SECTION_EXIT()
37
47void LMA_AccPhaseRun(LMA_Phase *const p_phase);
48
58void LMA_AccPhaseReset(LMA_Phase *const p_phase);
59
66void LMA_AccPhaseLoad(LMA_Phase *const p_phase);
67
72void LMA_PhaseResetHook(LMA_Phase *const p_phase);
73
74/******************
75 * DRIVERS
76 ******************/
80void LMA_ADC_Init(void);
81
86void LMA_ADC_Start(void);
87
92void LMA_ADC_Stop(void);
93
97void LMA_TMR_Init(void);
98
103void LMA_TMR_Start(void);
104
109void LMA_TMR_Stop(void);
110
114void LMA_RTC_Init(void);
115
120void LMA_RTC_Start(void);
121
126void LMA_RTC_Stop(void);
127
131void LMA_IMP_ActiveOn(void);
132
136void LMA_IMP_ActiveOff(void);
137
141void LMA_IMP_ReactiveOn(void);
142
146void LMA_IMP_ReactiveOff(void);
147
151void LMA_IMP_ApparentOn(void);
152
156void LMA_IMP_ApparentOff(void);
157
159
160#endif /* _LMA_PORT_H */
Type definitions for LMA.
void LMA_TMR_Start(void)
Starts the TMR running.
Definition LMA_Port.c:86
void LMA_ADC_Start(void)
Starts the ADC running.
Definition LMA_Port.c:71
void LMA_TMR_Stop(void)
Stops the TMR running.
Definition LMA_Port.c:91
void LMA_AccPhaseReset(LMA_Phase *const p_phase)
handles sample reset between cycles for a phase
Definition LMA_Port.c:31
void LMA_RTC_Init(void)
Initialises RTC.
Definition LMA_Port.c:96
void LMA_RTC_Start(void)
Starts the RTC running.
Definition LMA_Port.c:101
void LMA_ADC_Stop(void)
Stops the ADC running.
Definition LMA_Port.c:76
void LMA_AccPhaseLoad(LMA_Phase *const p_phase)
Move accumulators from temp to snapshot.
Definition LMA_Port.c:47
void LMA_TMR_Init(void)
Initialises TMR.
Definition LMA_Port.c:81
void LMA_IMP_ActiveOff(void)
Callback to turn off active impulse LED.
Definition LMA_Port.c:116
void LMA_IMP_ReactiveOn(void)
Callback to turn on reactive impulse LED.
Definition LMA_Port.c:121
void LMA_IMP_ApparentOn(void)
Callback to turn on apparent impulse LED.
Definition LMA_Port.c:131
void LMA_PhaseResetHook(LMA_Phase *const p_phase)
Hook called when resetting a phase.
Definition LMA_Port.c:60
void LMA_AccPhaseRun(LMA_Phase *const p_phase)
handles sample accumulation for a phase
Definition LMA_Port.c:15
void LMA_IMP_ActiveOn(void)
Callback to turn on active impulse LED.
Definition LMA_Port.c:111
void LMA_IMP_ApparentOff(void)
Callback to turn off apparent impulse LED.
Definition LMA_Port.c:136
void LMA_RTC_Stop(void)
Stops the RTC running.
Definition LMA_Port.c:106
void LMA_IMP_ReactiveOff(void)
Callback to turn off reactive impulse LED.
Definition LMA_Port.c:126
void LMA_ADC_Init(void)
Initialises ADC.
Definition LMA_Port.c:66
Phase data.
Definition LMA_Types.h:258