diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-08-16 13:01:15 -0230 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-08-16 13:01:15 -0230 |
| commit | 478a91bd82e27d8d6b2e597fd659e484ca6b205a (patch) | |
| tree | 05c58d2018059cbf9b60baeb26409f4df97358eb /sw/init.c | |
| parent | a8a68e5e77cac2fedb03a164acc666ccc1a1a8b1 (diff) | |
| download | can-gauge-interface-478a91bd82e27d8d6b2e597fd659e484ca6b205a.zip | |
add systests to makefile
Diffstat (limited to 'sw/init.c')
| -rw-r--r-- | sw/init.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sw/init.c b/sw/init.c new file mode 100644 index 0000000..9c89bee --- /dev/null +++ b/sw/init.c @@ -0,0 +1,17 @@ +#include <xc.h> + +#include "init.h" + +void +clockInit(void) { + OSCCON = 0xFC; // HFINTOSC @ 16MHz, 3x PLL, PLL enabled + ACTCON = 0x90; // active clock tuning enabled for USB +} + +void +pinsInit(void) { + // Disable all analog pin functions + ANSELA = 0; + ANSELB = 0; + ANSELC = 0; +} |