41 volatile uint32_t esos_tick_count;
45 extern void __esos_tmrSvcsExecute(
void);
61 void _ISRFAST _T1Interrupt (
void) {
64 __esos_tmrSvcsExecute();
85 void __esos_hw_InitSystemTick(
void) {
98 T1CON = T1_IDLE_CON + T1_PS_1_64 + T1_SOURCE_INT;
99 PR1 = MS_TO_TICKS(1, 64);
110 OSCCONBITS OSCCONBITS_copy;
112 OSCCONBITS_copy = OSCCONbits;
113 OSCCONBITS_copy.LPOSCEN = 1;
115 __builtin_write_OSCCONH(
BITS2BYTEH(OSCCONBITS_copy));
117 __builtin_write_OSCCONL(
BITS2BYTEL(OSCCONBITS_copy));
120 T1CON = T1_IDLE_CON + T1_PS_1_1 + T1_SOURCE_EXT + T1_SYNC_EXT_OFF;
147 uint32_t __esos_hw_GetSystemTickCount(
void) {
148 return esos_tick_count;
static void configClock()
This is the master include file for implementing ESOS on Microchip PIC24 MCUs.
#define BITS2BYTEL(sfrBitfield)
Return the low byte (as a uint8_t) of a bitfield.
#define BITS2BYTEH(sfrBitfield)
Return the high byte (as a uint8_t) of a bitfield.
unsigned char uint8_t
An abbreviation for an 8-bit unsigned integer.