@ interrupts num_interrupts = 32 uart0_int_num = 6 uart1_int_num = 7 timer0_int_num = 4 timer1_int_num = 5 i2c0_int_num = 9 i2c1_int_num = 19 .ifndef LPC2478_STK int_voffset = -0x0FF0 @ offset to VicVectAddress int_clear = 0x30 @ offset to VICVectAddress .else int_voffset = -0x0120 @ offset to VicAddress int_clear = 0x0F00 @ offset to VicAddress .endif int_base = 0xFFFFF000 @ VICIRQStatus int_status = 0x00 @ offset to VICIRQStatus int_enable = 0x10 @ offset to VicIntEnable int_disable = 0x14 @ offset to VicIntEnClear int_clear_vals = 0x00 uart0_int = 0x000040 @ bit 6 uart1_int = 0x000080 @ bit 7 timer0_int = 0x000010 @ bit 4 timer1_int = 0x000020 @ bit 5 i2c0_int = 0x000200 @ bit 9 i2c1_int = 0x080000 @ bit 19 scheme_ints_enb = timer0_int + timer1_int + i2c0_int + i2c1_int @ pin connect block -- A/VPB Peripheral #11 PINSEL0 = 0xE002C000 PINSEL1 = 0xE002C004 @ .ifndef LPC2478_STK PINSEL2 = 0xE002C014 @ LPC 213X LEDs .else PINSEL2 = 0xE002C008 @ LPC 2478 .endif PINSEL3 = 0xE002C00C @ LPC 2478 @ gpio -- A/VPB Peripheral #10 io0_base = 0xE0028000 @ IO0PIN io1_base = 0xE0028010 @ IO1PIN io_set = 0x04 io_dir = 0x08 io_clear = 0x0C @ uarts -- A/VPB Peripheral #3 uart0_base = 0xE000C000 @ U0RBR uart1_base = 0xE0010000 @ U1RBR uart_rhr = 0x00 @ offset to uart rhr register uart_thr = 0x00 @ offset to uart thr register uart_istat = 0x08 uart_status = 0x14 @ offset to uart status register uart_txrdy = 0x20 @ bit indicating uart THR empty @ timers timer0_base = 0XE0004000 @ T0IR timer1_base = 0XE0008000 @ T1IR timer_istat = 0x00 timer_iset = 0x00 timer_ctrl = 0x04 @ i2c -- A/VPB Peripheral #7 i2c0_base = 0xE001C000 @ I2C0CONSET i2c1_base = 0xE005C000 @ I2C1CONSET i2c_cset = 0x00 i2c_status = 0x04 i2c_rhr = 0x08 i2c_thr = 0x08 i2c_data = 0x08 i2c_address = 0x0C i2c_cclear = 0x18 i2c_irm_rcv = 0x50 i2c_irs_rcv = 0x80 @ usb -- A/VPB Peripheral #36 (LPC 214x, 215x) .ifndef LPC2478_STK usb_base = 0xE0090000 @ USBDevIntSt .else usb_base = 0xFFE0C200 @ USBDevIntSt .endif usb_istat_dv = 0x00 @ USBDevIntSt usb_iclear_dv = 0x08 @ USBDevIntClr usb_cmd_code = 0x10 @ USBCmdCode -- USB Command Code usb_cmd_data = 0x14 @ USBCmdData -- USB Command Data usb_rxdata = 0x18 @ USBRxData -- USB Receive Data usb_txdata = 0x1C @ USBTxData -- USB Transmit Data usb_rxplen = 0x20 @ USBRxPLen -- USB Receive Packet Length usb_txplen = 0x24 @ USBTxPLen -- USB Transmit Packet Length usb_ctrl = 0x28 @ USBCtrl -- USB Control usb_istat_ep = 0x30 @ USBEpIntSt usb_iclear_ep = 0x38 @ USBEpIntClr usb_reep = 0x44 @ USBReEp -- USB Realize Endpoint usb_epind = 0x48 @ USBEpInd -- USB Endpoint Index usb_maxpsize = 0x4C @ USBMaxPSize -- USB MaxPacketSize usb_ibulkin = 0x00 @ Where to find status of Bulk IN EP usb_iep_mask = 0x04 @ mask for endpoint interrupt usb_idv_mask = 0x08 @ mask for device status interrupt usb_busreset = 0x10 @ bus reset bit usb_suspend = 0x08 @ suspend bit usb_txrdy = 0x80 @ Tx ready bit in usb_iBulk_IN usb_itxendp = 0x80 @ Tx end of packet interrupt bit UsbControlOutEP = 0x00 @ Control IN Endpoint (phys 0, log 0) UsbControlInEP = 0x80 @ Control IN Endpoint (phys 1, log 0) UsbBulkOutEP = 0x02 @ Bulk OUT EP (phys = 4, log = 2) UsbBulkInEP = 0x82 @ Bulk IN EP (phys = 5, log = 2) usbBulkINDescr = 0x82 @ Bulk IN is EP 2 (for descriptor at end of file) usbCO_ibit = 0x01 @ bit indicating interrupt for Control OUT Endpoint usbCI_ibit = 0x02 @ bit indicating interrupt for Control IN Endpoint usbBO_ibit = 0x10 @ bit indicating interrupt for Bulk OUT Endpoint usbBI_ibit = 0x20 @ bit indicating interrupt for Bulk IN Endpoint usbCO_setupbit = 0x04 @ EP status bit indicating last transfer was a SETUP packet USBIntSt = 0xE01FC1C0 @ USB Device Interrupt Status R/W 0x8000 0000 @ System Control -- Peripheral #127 sys_ctrl = 0xE01FC000 .ifndef LPC2478_STK PLOCK_bit = 0x0400 @ PLOCK bit in PLLSTAT .else PLOCK_bit = 0x04000000 @ LPC 2478 PLOCK bit in PLLSTAT .endif @ flash IAP_ENTRY = 0x7FFFFFF1 @ IAP routine entry point in boot sector