From 8de6b2c199e67ae46e325efaa161b417742de977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Sat, 28 Feb 2015 13:21:33 +0100 Subject: [PATCH] change to more generic IO mapping --- main.c | 9 +++++---- main.h | 27 ++++----------------------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/main.c b/main.c index ec11c90..0c3a470 100644 --- a/main.c +++ b/main.c @@ -12,6 +12,7 @@ * along with this program. If not, see . * */ + #include // Standard Integer Types #include // Standard IO facilities #include // General utilities @@ -31,19 +32,19 @@ /* switch off LED */ void led_off(void) { - PORTB &= ~(1<. * */ -/* This is the main part of the waschkarte auflader program. - */ /* peripherals */ /* LED to indicate scale reading * pin: PB5, LED L */ -#define LED PB5 -/* high when the scale is on - * pin: PD5, PCINT21, D5 - */ -#define SCALE_ON PD5 -/* PWM weight signal - * PWM frequency is ~3Hz - * high time increases with increasing weight (propotionnally) - * low time decreases with increasing weight - * signal level is 1V - * positive pin of analog comparator used to measure PWM - * pin: PD6, AIN0, D6 -*/ -#define SCALE_PWM PD6 -/* negative pin of analog comparator - * set at 0.2-0.8V using voltage divider - * used to detect PWM signal change - * pin: PD7, AIN1, D7 - */ -#define REF_PWM PD7 - +#define LED_PORT PORTB +#define LED_DDR DDRB +#define LED_PIN PINB +#define LED_IO PB5