Files

mappings.h
/* * IO Mappings for the PIC24 */ #ifndef MAPPINGS_H #define MAPPINGS_H #define IBUS_UART_RX_PIN_MODE TRISDbits.TRISD11 #define IBUS_UART_TX_PIN_MODE TRISDbits.TRISD10 #define IBUS_UART_STATUS_MODE TRISDbits.TRISD0 #define BT_UART_MODULE 1 #define BT_UART_RX_PRIORITY 1 #define BT_UART_RX_PIN_MODE TRISGbits.TRISG6 #define BT_UART_RX_PIN LATGbits.LATG6 #define BT_UART_RX_RPIN 21 #define BT_UART_TX_PIN_MODE TRISGbits.TRISG7 #define BT_UART_TX_PIN LATGbits.LATG7 #define BT_UART_TX_RPIN 26 #define SYSTEM_UART_MODULE 2 #define SYSTEM_UART_RX_PRIORITY 2 #define SYSTEM_UART_RX_PIN_MODE TRISDbits.TRISD2 #define SYSTEM_UART_RX_PIN LATDbits.LATD2 #define SYSTEM_UART_RX_RPIN 23 #define SYSTEM_UART_TX_PIN_MODE TRISDbits.TRISD1 #define SYSTEM_UART_TX_PIN LATDbits.LATD1 #define SYSTEM_UART_TX_RPIN 24 #define BOOTLOADER_PLATFORM "BLUEBUS_BOOTLOADER_2_3" #define BOOTLOADER_TIMEOUT 100 #define BOOTLOADER_STATUS_LED_ON 0x01 #define BOOT_MODE_APPLICATION 0 #define BOOT_MODE_BOOTLOADER 1 #define BOOT_MODE_NOW 2 #define BOOT_SOURCE_SYSTEM 0x01 #define CONFIG_SN_ADDRESS_MSB 0x00 #define CONFIG_SN_ADDRESS_LSB 0x01 #define CONFIG_FIRMWARE_VERSION_ADDRESS_MAJOR 0x02 #define CONFIG_FIRMWARE_VERSION_ADDRESS_MINOR 0x03 #define CONFIG_FIRMWARE_VERSION_ADDRESS_PATCH 0x04 #define CONFIG_BUILD_DATE_ADDRESS_WEEK 0x05 #define CONFIG_BUILD_DATE_ADDRESS_YEAR 0x06 #define CONFIG_BOOTLOADER_MODE 0x07 #define CONFIG_BOOTLODADER_MODE_APP 0xAB #define BOOTLOADER_BOOTLOADER_START 0x800 #define BOOTLOADER_APPLICATION_START 0x1800 #define BOOTLOADER_APPLICATION_VECTOR 0x2000 #define BOOTLOADER_APPLICATION_END 0xAB000 #define ON_LED_MODE TRISEbits.TRISE0 #define ON_LED LATEbits.LATE0 #define EEPROM_SPI_SDO_MODE 7 #define EEPROM_SPI_SCK_MODE 8 #define EEPROM_CS_PIN PORTDbits.RD8 #define EEPROM_CS_IO_MODE TRISDbits.TRISD8 #define EEPROM_SCK_RPIN RPOR8bits.RP16R #define EEPROM_SDI_RPIN 4 #define EEPROM_SDI_PIN_MODE TRISDbits.TRISD9 #define EEPROM_SDO_RPIN RPOR15bits.RP30R #define BOARD_VERSION_ONE 0 #define BOARD_VERSION_TWO 1 #define BOARD_VERSION_MODE TRISGbits.TRISG8 #define BOARD_VERSION_STATUS PORTGbits.RG8 #define BOARD_VERSION_PD IOCPDGbits.IOCPDG8 #define BT_BOOT_TYPE_MODE TRISEbits.TRISE1 #define BT_BOOT_TYPE LATEbits.LATE1 #define BT_DATA_SEL_MODE TRISEbits.TRISE4 #define BT_DATA_SEL LATEbits.LATE4 #define BT_MFB_MODE TRISEbits.TRISE5 #define BT_MFB LATEbits.LATE5 #define BT_RST_MODE TRISFbits.TRISF0 #define BT_RST LATFbits.LATF0 #define UART_SEL_MODE TRISDbits.TRISD3 #define UART_SEL LATDbits.LATD3 #define UART_SEL_BT 0 #define UART_SEL_MCU 1 #define IVT_MODE INTCON2bits.AIVTEN #define IVT_MODE_APP 1 #define IVT_MODE_BOOT 0 #define IBUS_EN_MODE TRISFbits.TRISF1 #define IBUS_EN_STATUS PORTFbits.RF1 #define IBUS_EN LATFbits.LATF1 #define PAM_SHDN_MODE TRISEbits.TRISE3 #define PAM_SHDN LATEbits.LATE3 #define SPDIF_RST_MODE TRISEbits.TRISE2 #define SPDIF_RST LATEbits.LATE2 #define SYS_DTR_MODE TRISDbits.TRISD4 #define RECOVERY_MODE TRISDbits.TRISD5 #define RECOVERY_STATUS PORTDbits.RD5 #define TEL_ON_MODE_V1 TRISBbits.TRISB7 #define TEL_ON_V1 LATBbits.LATB7 #define TEL_MUTE_MODE_V1 TRISEbits.TRISE2 #define TEL_MUTE_V1 LATEbits.LATE2 #define TEL_ON_MODE_V2 TRISFbits.TRISF5 #define TEL_ON_V2 LATFbits.LATF5 #define TEL_MUTE_MODE_V2 TRISFbits.TRISF4 #define TEL_MUTE_V2 LATFbits.LATF4 #endif /* MAPPINGS_H */
Report a bug