2011-05-20 22:01:53 +00:00
|
|
|
#ifndef __BASIC_H_
|
|
|
|
#define __BASIC_H_
|
|
|
|
|
|
|
|
#include "core/gpio/gpio.h"
|
|
|
|
#include "core/adc/adc.h"
|
|
|
|
|
|
|
|
// LED
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_LED0 0,11
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_LED1 1,7
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_LED2 1,6
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_LED3 1,11
|
2011-05-20 22:01:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Infrared
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_IROUT 1,5
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_IRIN 1,8
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_IRIN_IO IOCON_PIO1_8
|
|
|
|
|
|
|
|
|
|
|
|
// Buttons
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_BTN0 0,1
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_BTN0_IO IOCON_PIO0_1
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_BTN1 2,9
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_BTN1_IO IOCON_PIO2_9
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_BTN2 2,6
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_BTN2_IO IOCON_PIO2_6
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_BTN3 3,3
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_BTN3_IO IOCON_PIO3_3
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_BTN4 1,4
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_BTN4_IO IOCON_PIO1_4
|
|
|
|
|
|
|
|
|
|
|
|
// LCD
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_LCD_BL 1,10
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_LCD_A0 2,0
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_LCD_CS 2,1
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_LCD_RST 2,2
|
2011-05-20 22:01:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
// I2C
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_I2C_SCL 0,4
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_I2C_SCA 0,5
|
2011-05-20 22:01:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
// SPI
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_SPI_MISO 0,8
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_SPI_MOSI 0,9
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_SPI_SCK 0,10
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_SPI_SS0 2,5
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_SPI_SS1 2,4
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_SPI_SS2 2,8
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_SPI_SS3 3,2
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_SPI_SS4 3,1
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_SPI_SS5 2,11
|
2011-05-20 22:01:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Power
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_PWR_VOLT 1,0
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_PWR_GOOD 1,9
|
2011-05-20 22:01:53 +00:00
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_PWR_CHRG 2,3
|
2011-05-20 22:01:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Hackerbus
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_HB0 1,3
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_HB0_IO IOCON_PIO1_3
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_HB1 1,2
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_HB1_IO IOCON_PIO1_2
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_HB2 1,1
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_HB2_IO IOCON_PIO1_1
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_HB3 0,2
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_HB3_IO IOCON_PIO0_2
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_HB4 2,7
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_HB4_IO IOCON_PIO2_7
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_HB5 0,6
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_HB5_IO IOCON_PIO0_6
|
|
|
|
|
|
|
|
|
|
|
|
// Misc
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_BUSINT 3,0
|
2011-05-20 22:01:53 +00:00
|
|
|
#define RB_BUSINT_IO IOCON_PIO3_0
|
|
|
|
|
2011-05-20 22:31:58 +00:00
|
|
|
#define RB_USB_VBUS 0,3
|
2011-05-20 22:01:53 +00:00
|
|
|
|
|
|
|
#define RB_EEPROM_ADDR 0xA0
|
|
|
|
|
|
|
|
void rbInit(void);
|
|
|
|
|
|
|
|
#endif
|