From 0870da1dcbb2b446851bfcf507d4535f9eded417 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 24 Jun 2018 19:57:42 -0600 Subject: Refactored driver/hardware definition code to be one file per driver type. --- hwdef-nanjg.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 hwdef-nanjg.h (limited to 'hwdef-nanjg.h') diff --git a/hwdef-nanjg.h b/hwdef-nanjg.h new file mode 100644 index 0000000..add10d1 --- /dev/null +++ b/hwdef-nanjg.h @@ -0,0 +1,16 @@ +/* NANJG driver layout + */ +#define STAR2_PIN PB0 +#define STAR3_PIN PB4 +#define STAR4_PIN PB3 +#define PWM_PIN PB1 +#define VOLTAGE_PIN PB2 +#define ADC_CHANNEL 0x01 // MUX 01 corresponds with PB2 +#define ADC_DIDR ADC1D // Digital input disable bit corresponding with PB2 +#define ADC_PRSCL 0x06 // clk/64 + +#define PWM_LVL OCR0B // OCR0B is the output compare register for PB1 + +#define FAST 0x23 // fast PWM channel 1 only +#define PHASE 0x21 // phase-correct PWM channel 1 only + -- cgit v1.2.3