diff options
author | Nao Pross <naopross@thearcway.org> | 2018-04-10 16:23:38 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-04-10 16:23:38 +0200 |
commit | 334d6c8d7a99184cd6189167adc1d29900b0d270 (patch) | |
tree | 8b73a235d3d3ae8106cf23a175d125a656bceb1e /main.cpp | |
download | SAMLiquidSmoke-334d6c8d7a99184cd6189167adc1d29900b0d270.tar.gz SAMLiquidSmoke-334d6c8d7a99184cd6189167adc1d29900b0d270.zip |
First commit
- Main
- Barebone structure for Led class
Diffstat (limited to '')
-rw-r--r-- | main.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..4189181 --- /dev/null +++ b/main.cpp @@ -0,0 +1,58 @@ + +// PIC32MX470F512H Configuration Bit Settings + +// 'C' source line config statements + +// DEVCFG3 +// USERID = No Setting +#pragma config FSRSSEL = PRIORITY_7 // Shadow Register Set Priority Select (SRS Priority 7) +#pragma config PMDL1WAY = ON // Peripheral Module Disable Configuration (Allow only one reconfiguration) +#pragma config IOL1WAY = ON // Peripheral Pin Select Configuration (Allow only one reconfiguration) +#pragma config FUSBIDIO = ON // USB USID Selection (Controlled by the USB Module) +#pragma config FVBUSONIO = ON // USB VBUS ON Selection (Controlled by USB Module) + +// DEVCFG2 +#pragma config FPLLIDIV = DIV_12 // PLL Input Divider (12x Divider) +#pragma config FPLLMUL = MUL_24 // PLL Multiplier (24x Multiplier) +#pragma config UPLLIDIV = DIV_12 // USB PLL Input Divider (12x Divider) +#pragma config UPLLEN = OFF // USB PLL Enable (Disabled and Bypassed) +#pragma config FPLLODIV = DIV_256 // System PLL Output Clock Divider (PLL Divide by 256) + +// DEVCFG1 +#pragma config FNOSC = FRCDIV // Oscillator Selection Bits (Fast RC Osc w/Div-by-N (FRCDIV)) +#pragma config FSOSCEN = ON // Secondary Oscillator Enable (Enabled) +#pragma config IESO = ON // Internal/External Switch Over (Enabled) +#pragma config POSCMOD = OFF // Primary Oscillator Configuration (Primary osc disabled) +#pragma config OSCIOFNC = OFF // CLKO Output Signal Active on the OSCO Pin (Disabled) +#pragma config FPBDIV = DIV_8 // Peripheral Clock Divisor (Pb_Clk is Sys_Clk/8) +#pragma config FCKSM = CSDCMD // Clock Switching and Monitor Selection (Clock Switch Disable, FSCM Disabled) +#pragma config WDTPS = PS1048576 // Watchdog Timer Postscaler (1:1048576) +#pragma config WINDIS = OFF // Watchdog Timer Window Enable (Watchdog Timer is in Non-Window Mode) +#pragma config FWDTEN = ON // Watchdog Timer Enable (WDT Enabled) +#pragma config FWDTWINSZ = WINSZ_25 // Watchdog Timer Window Size (Window Size is 25%) + +// DEVCFG0 +#pragma config DEBUG = OFF // Background Debugger Enable (Debugger is Disabled) +#pragma config JTAGEN = ON // JTAG Enable (JTAG Port Enabled) +#pragma config ICESEL = ICS_PGx1 // ICE/ICD Comm Channel Select (Communicate on PGEC1/PGED1) +#pragma config PWP = OFF // Program Flash Write Protect (Disable) +#pragma config BWP = OFF // Boot Flash Write Protect bit (Protection Disabled) +#pragma config CP = OFF // Code Protect (Protection Disabled) + +// #pragma config statements should precede project file includes. +// Use project enums instead of #define for ON and OFF. + +#include <xc.h> +#include <cstdlib> + +#include "Led.hpp" + + + +int main(int argc, char **argv) { + + Led redLed(Led::Color::RED); + + return 0; +} + |