aboutsummaryrefslogtreecommitdiffstats
path: root/fw/init.c
blob: 9c89bee2f4ba373219803fc3c965286bf1c0a433 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;
}