diff options
Diffstat (limited to 'demos/AVR-AT90CANx-GCC/board.c')
-rw-r--r-- | demos/AVR-AT90CANx-GCC/board.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/demos/AVR-AT90CANx-GCC/board.c b/demos/AVR-AT90CANx-GCC/board.c index 2fdf128a1..b97bd94b5 100644 --- a/demos/AVR-AT90CANx-GCC/board.c +++ b/demos/AVR-AT90CANx-GCC/board.c @@ -17,10 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <ch.h>
-#include <serial.h>
-
-#include "board.h"
+#include "ch.h"
+#include "hal.h"
CH_IRQ_HANDLER(TIMER0_COMP_vect) {
@@ -71,16 +69,16 @@ void hwinit(void) { /*
* Timer 0 setup.
*/
- TCCR0A = (1 << WGM01) | (0 << WGM00) | // CTC mode.
- (0 << COM0A1) | (0 << COM0A0) | // OC0A disabled (normal I/O).
- (0 << CS02) | (1 << CS01) | (1 << CS00); // CLK/64 clock source.
+ TCCR0A = (1 << WGM01) | (0 << WGM00) | /* CTC mode. */
+ (0 << COM0A1) | (0 << COM0A0) | /* OC0A disabled. */
+ (0 << CS02) | (1 << CS01) | (1 << CS00); /* CLK/64 clock. */
OCR0A = F_CPU / 64 / CH_FREQUENCY - 1;
- TCNT0 = 0; // Reset counter.
- TIFR0 = (1 << OCF0A); // Reset pending (if any).
- TIMSK0 = (1 << OCIE0A); // Interrupt on compare.
+ TCNT0 = 0; /* Reset counter. */
+ TIFR0 = (1 << OCF0A); /* Reset pending. */
+ TIMSK0 = (1 << OCIE0A); /* IRQ on compare. */
/*
- * Other initializations.
+ * HAL initialization.
*/
- sdInit();
+ halInit();
}
|