aboutsummaryrefslogtreecommitdiffstats
path: root/fw/config.h
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-08-16 14:59:36 -0230
committerSam Anthony <sam@samanthony.xyz>2025-08-16 14:59:36 -0230
commitee61ef56f775e44fd0b857a960102148910e6dce (patch)
tree9063a6a74af17d9a0ef45392dc28eaf770a22d69 /fw/config.h
parent478a91bd82e27d8d6b2e597fd659e484ca6b205a (diff)
downloadcan-gauge-interface-ee61ef56f775e44fd0b857a960102148910e6dce.zip
usbcom: modified libusb example
Diffstat (limited to 'fw/config.h')
-rw-r--r--fw/config.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/fw/config.h b/fw/config.h
new file mode 100644
index 0000000..f369673
--- /dev/null
+++ b/fw/config.h
@@ -0,0 +1,21 @@
+// CONFIG1
+#pragma config FOSC = INTOSC // Oscillator Selection Bits (INTOSC oscillator: I/O function on CLKIN pin)
+#pragma config WDTE = OFF // Watchdog Timer Enable (WDT disabled)
+#pragma config PWRTE = OFF // Power-up Timer Enable (PWRT disabled)
+#pragma config MCLRE = ON // MCLR Pin Function Select (MCLR pin is MCLR)
+#pragma config CP = OFF // Flash Program Memory Code Protection (Program memory code protection is disabled)
+#pragma config BOREN = ON // Brown-out Reset Enable (Brown-out Reset enabled)
+#pragma config CLKOUTEN = OFF // Clock Out Enable (CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin)
+#pragma config IESO = OFF // Internal/External Switchover Mode (Internal/External Switchover Mode is disabled)
+#pragma config FCMEN = OFF // Fail-Safe Clock Monitor Enable (Fail-Safe Clock Monitor is disabled)
+
+// CONFIG2
+#pragma config WRT = OFF // Flash Memory Self-Write Protection (Write protection off)
+#pragma config CPUDIV = NOCLKDIV// CPU System Clock Selection Bit (NO CPU system divide)
+#pragma config USBLSCLK = 48MHz // USB Low SPeed Clock Selection bit (System clock expects 48 MHz, FS/LS USB CLKENs divide-by is set to 8.)
+#pragma config PLLMULT = 3x // PLL Multipler Selection Bit (3x Output Frequency Selected)
+#pragma config PLLEN = ENABLED // PLL Enable Bit (3x or 4x PLL Enabled)
+#pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable (Stack Overflow or Underflow will cause a Reset)
+#pragma config BORV = LO // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), low trip point selected.)
+#pragma config LPBOR = OFF // Low-Power Brown Out Reset (Low-Power BOR is disabled)
+#pragma config LVP = ON // Low-Voltage Programming Enable