1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-14 08:03:09 +03:00

Added support for extra analog inputs and pwms on ATmega168.

This commit is contained in:
David A. Mellis
2006-10-15 11:45:26 +00:00
parent debec4e37f
commit 41d86d5a75
3 changed files with 73 additions and 26 deletions

View File

@@ -109,15 +109,21 @@ int analog_out_pin_to_timer_array[NUM_DIGITAL_PINS] = {
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
// on the ATmega168, digital pin 3 has pwm
// on the ATmega168, digital pin 3 has hardware pwm
#if defined(__AVR_ATmega168__)
TIMER2B,
#else
NOT_ON_TIMER,
#endif
NOT_ON_TIMER,
// on the ATmega168, digital pins 5 and 6 have hardware pwm
#if defined(__AVR_ATmega168__)
TIMER0B,
TIMER0A,
#else
NOT_ON_TIMER,
NOT_ON_TIMER,
#endif
NOT_ON_TIMER,
NOT_ON_TIMER,
TIMER1A,
@@ -161,6 +167,10 @@ pin_t analog_in_pin_to_port_array[NUM_ANALOG_IN_PINS] = {
{ PC, 3 },
{ PC, 4 },
{ PC, 5 },
#if defined(__AVR_ATmega168__)
{ NOT_A_PIN, 6 },
{ NOT_A_PIN, 7 },
#endif
};
pin_t *analog_in_pin_to_port = analog_in_pin_to_port_array;