diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-27 10:23:06 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-27 10:23:06 -0400 |
commit | da03595c32f3822d0b8c96ab61ec7b65131196ee (patch) | |
tree | 2c3feb6fe620b48aeed3497d5f5fab0ac0698b6c /bootloaders/nuevo_diskloader/src/Platform.h | |
parent | 29cfd9e9fe12cc10fc8f4bae5c884c514ad95902 (diff) |
brought nuevo_diskloader changes over to diskloader
Moved nuevo_diskloader files into diskloader directory. Changed back to real PID for Leonardo
Diffstat (limited to 'bootloaders/nuevo_diskloader/src/Platform.h')
-rw-r--r-- | bootloaders/nuevo_diskloader/src/Platform.h | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/bootloaders/nuevo_diskloader/src/Platform.h b/bootloaders/nuevo_diskloader/src/Platform.h deleted file mode 100644 index 4b58f9f..0000000 --- a/bootloaders/nuevo_diskloader/src/Platform.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Platform.h - */ - -#ifndef __PLATFORM_H__ -#define __PLATFORM_H__ - -#include <inttypes.h> -#include <avr/io.h> -#include <avr/pgmspace.h> -#include <avr/boot.h> -#include <util/delay.h> -#include <avr/interrupt.h> -#include <avr/wdt.h> - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#ifdef __cplusplus -extern "C"{ -#endif - -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned long u32; - -#define CDC_ENABLED - -#define USB_PID_LEONARDO 0x0034 -#define USB_PID_MICRO 0x0035 -#define USB_VID 0x2341 // arduino LLC vid -#define USB_PID ARDUINO_MODEL_PID // passed in by Makefile - 0x0034 for Leonardo, 0x0035 for MIcro - -//#include "USBDesc.h" -//#include "../../../cores/arduino/USBCore.h" - - -#define min(a,b) ((a)<(b)?(a):(b)) - -#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) -#define DISABLE_JTAG() MCUCR = (1 << JTD) | (1 << IVCE) | (0 << PUD); MCUCR = (1 << JTD) | (0 << IVSEL) | (0 << IVCE) | (0 << PUD) - -#define BOARD_INIT() DDRC |= (1<<7); DDRB |= (1<<0); DDRE |= (1<<6); CPU_PRESCALE(0); DISABLE_JTAG(); // for XXX-series boards -//#define BOARD_INIT() DDRC |= (1<<7); DDRB |= (1<<0); DDRD |= (1<<5); CPU_PRESCALE(0); DISABLE_JTAG(); // for non-XXX boards - -// for XXX-series boards -#define TX_LED_OFF() PORTE |= (1<<6) -#define TX_LED_ON() PORTE &= ~(1<<6) -#define RX_LED_OFF() PORTB |= (1<<0) -#define RX_LED_ON() PORTB &= ~(1<<0) -#define L_LED_OFF() PORTC &= ~(1<<7) -#define L_LED_ON() PORTC |= (1<<7) -#define L_LED_TOGGLE() PORTC ^= (1<<7) - -// these for non-XXX boards -//#define LED0 PORTC &= ~(1<<7) -//#define LED1 PORTC |= (1<<7) -//#define TXLED0 PORTD |= (1<<5) -//#define TXLED1 PORTD &= ~(1<<5) -//#define RXLED0 PORTB |= (1<<0) -//#define RXLED1 PORTB &= ~(1<<0) - -#ifdef __cplusplus -} /* extern "C"{ */ -#endif - -#include "USBDesc.h" -#include "USBCore.h" -#include "USBAPI.h" - -#endif /* __PLATFORM_H__ */ |