mirror of
https://github.com/brmlab/edubrm.git
synced 2025-12-18 19:33:58 +01:00
SPP support beta
This commit is contained in:
parent
a690b0b8f1
commit
15685182ae
4 changed files with 268 additions and 5 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include "gpio.h"
|
||||
#include "rom_drivers.h"
|
||||
#include "config.h"
|
||||
#include "ssp.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
@ -64,10 +65,14 @@ int main (void)
|
|||
volatile int n;
|
||||
// Code Red Red Suite and LPCXpresso by Code Red both call SystemInit() in
|
||||
// the C startup code
|
||||
#ifndef __CODERED__
|
||||
//#ifndef __CODERED__
|
||||
SystemInit();
|
||||
#endif
|
||||
|
||||
//#endif
|
||||
|
||||
/*
|
||||
LPC_GPIO2->MASKED_ACCESS[0x01<<0] = 1 << 0;
|
||||
SSPSend("BIITER", 6);
|
||||
*/
|
||||
|
||||
HidDevInfo.idVendor = USB_VENDOR_ID;
|
||||
HidDevInfo.idProduct = USB_PROD_ID;
|
||||
|
|
@ -86,7 +91,7 @@ int main (void)
|
|||
LPC_SYSCON->SYSAHBCLKCTRL |= (EN_TIMER32_1 | EN_IOCON | EN_USBREG);
|
||||
|
||||
/* Use pll and pin init function in rom */
|
||||
(*rom)->pUSBD->init_clk_pins();
|
||||
(*rom)->pUSBD->init_clk_pins();
|
||||
|
||||
/* insert a delay between clk init and usb init */
|
||||
for (n = 0; n < 75; n++) {}
|
||||
|
|
@ -94,6 +99,8 @@ int main (void)
|
|||
(*rom)->pUSBD->init(&DeviceInfo); /* USB Initialization */
|
||||
(*rom)->pUSBD->connect(TRUE); /* USB Connect */
|
||||
|
||||
SSPInit();
|
||||
|
||||
while (1)
|
||||
__WFI();
|
||||
}
|
||||
|
|
@ -106,3 +113,10 @@ void USB_IRQHandler()
|
|||
{
|
||||
(*rom)->pUSBD->isr();
|
||||
}
|
||||
|
||||
void SSP_IRQHandler(void)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue