HWA
Bare metal programming with style
nanodccduino.h
Go to the documentation of this file.
1
2
/* This file is part of the HWA project.
3
* Copyright (c) 2012,2015 Christophe Duparquet.
4
* All rights reserved. Read LICENSE.TXT for details.
5
*/
6
38
/* These are mostly the values as the board is shipped, except the bootsection
39
* size which is 1024 with Diabolo instead of 2048 with the Arduino bootloader.
40
*/
41
#define HW_DEVICE_BOOT bootloader
42
#define HW_DEVICE_BOOTSECTION_SIZE 1024
43
44
#define HW_DEVICE_CLK_SRC low_power_xosc
45
#define HW_DEVICE_CLK_SRC_HZ 16000000
46
#define HW_DEVICE_CLK_PSC 1
47
#define HW_DEVICE_STARTUP_DELAYS 16KCK_14CK_64ms
48
#define HW_DEVICE_BROWNOUT_DETECTION 4100_4500mV
49
#define HW_DEVICE_SELF_PROGRAMMING enabled
50
51
#define HW_DEVICE_EXTERNAL_RESET enabled
52
#define HW_DEVICE_DEBUG_WIRE disabled
53
#define HW_DEVICE_WATCHDOG_ALWAYS_ON no
54
#define HW_DEVICE_CLOCK_OUTPUT disabled
55
56
/* Settings for building the Diabolo bootloader
57
* Settings for the Diabolo application are in the board's Makefile
58
*/
59
#define DIABOLO_PIN_RX (pin,rxd)
60
#define DIABOLO_PIN_TX (pin,txd)
61
#define DIABOLO_SYNC 51
62
63
/* Board pins
64
*/
65
#define ARDUINO
66
#define NANODCCDUINO
67
68
#define PIN_RX0 (portd,0)
69
#define PIN_TX1 (portd,1)
70
#define PIN_D2 (portd,2) // INT0
71
#define PIN_D3 (portd,3) // OC2B INT1
72
#define PIN_D4 (portd,4) // T0
73
#define PIN_D5 (portd,5) // OC0B T1
74
#define PIN_D6 (portd,6) // OC0A AIN0
75
#define PIN_D7 (portd,7) // AIN1
76
77
#define PIN_D8 (portb,0) // ICP1
78
#define PIN_D9 (portb,1) // OC1A
79
#define PIN_D10 (portb,2) // OC1B SS
80
#define PIN_D11 (portb,3) // OC2A MOSI
81
#define PIN_D12 (portb,4) // MISO
82
#define PIN_D13 (portb,5) // SCK
83
84
#define PIN_A5 (portc,5) // SCL
85
#define PIN_A4 (portc,4) // SDA
86
87
#define PIN_SS (portb,2)
88
#define PIN_MOSI (portb,3)
89
#define PIN_MISO (portb,4)
90
#define PIN_SCK (portb,5)
91
92
#define PIN_ANALOG_INPUT (pin,adc0)
93
94
#define PIN_LED (portb,5)
95
96
97
/* Pins for swuart1
98
*/
99
#define PIN_TX2 PIN_D8
100
#define PIN_RX2 PIN_D9
101
102
/* Include HWA MCU definitions
103
*/
104
#include <
hwa/atmega328p_au.h
>
atmega328p_au.h
ATmega328P-AU.
Generated for HWA by
1.8.6