This commit is contained in:
2023-03-03 13:51:01 +01:00
parent 37b2cb0032
commit 3457e3e963
15 changed files with 1312 additions and 25 deletions

View File

@@ -67,6 +67,14 @@
#define PULL_UP_ENABLED 1
#define PULL_UP_DISABLED 0
// get/set RC2 procedures
#define RC2_SetHigh() do { LATCbits.LATC2 = 1; } while(0)
#define RC2_SetLow() do { LATCbits.LATC2 = 0; } while(0)
#define RC2_Toggle() do { LATCbits.LATC2 = ~LATCbits.LATC2; } while(0)
#define RC2_GetValue() PORTCbits.RC2
#define RC2_SetDigitalInput() do { TRISCbits.TRISC2 = 1; } while(0)
#define RC2_SetDigitalOutput() do { TRISCbits.TRISC2 = 0; } while(0)
// get/set voltage aliases
#define voltage_TRIS TRISFbits.TRISF0
#define voltage_LAT LATFbits.LATF0