fw: Adapt I/O pins to new hardware

This commit is contained in:
Markus Koch 2020-08-08 16:54:23 +02:00
parent c6ff3c4923
commit 87b3bf280f
3 changed files with 7 additions and 8 deletions

View File

@ -3,7 +3,7 @@
#include <avr/io.h>
#define ADC_CHANNEL 0
#define PORT_ADCC(t) t##D
#define PORT_ADCC(t) t##C
#define PIN_ADCC (1 << 1)
// Nominal 3.7V: 195; Full 4.2V: 220

View File

@ -2,16 +2,15 @@
#define INPUT_H
#define PORT_KEYPAD(t) t##D // Keys connected to: 0,1,2(INT0->POWER),5,6,7
#define PIN_KEYPAD_MASK 0b11100111
#define PIN_KEYPAD_MASK 0b11111111
#define PORT_KEYAUX(t) t##B
#define PIN_ROTARY_PUSH (1 << 0)
#define PORT_SBCMON(t) t##C
#define PIN_SBCMON (1 << 1)
#define PORT_ROTARY(t) t##D
#define PIN_ROTARY_A (1 << 3) // INT1
#define PIN_ROTARY_B (1 << 4)
#define PORT_ROTARY(t) t##B
#define PIN_ROTARY_A (1 << 0)
#define PIN_ROTARY_B (1 << 1)
void input_init();
void input_proc();

View File

@ -2,8 +2,8 @@
#define PM_H
#include <avr/io.h>
#define PORT_SBCPOW(t) t##C
#define PIN_SBCPOW (1 << 2)
#define PORT_SBCPOW(t) t##B
#define PIN_SBCPOW (1 << 7)
void pm_init();
void suspend();