some minor cosmetic fixes
This commit is contained in:
57
sys/BaS.c
57
sys/BaS.c
@@ -96,20 +96,20 @@ static inline bool pic_rxready(void)
|
|||||||
|
|
||||||
void write_pic_byte(uint8_t value)
|
void write_pic_byte(uint8_t value)
|
||||||
{
|
{
|
||||||
/* Wait until the transmitter is ready or 1000us are passed */
|
/* Wait until the transmitter is ready or 1000us are passed */
|
||||||
waitfor(1000, pic_txready);
|
waitfor(1000, pic_txready);
|
||||||
|
|
||||||
/* Transmit the byte */
|
/* Transmit the byte */
|
||||||
*(volatile uint8_t*)(&MCF_PSC3_PSCTB_8BIT) = value; // Really 8-bit
|
*(volatile uint8_t*)(&MCF_PSC3_PSCTB_8BIT) = value; // Really 8-bit
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t read_pic_byte(void)
|
uint8_t read_pic_byte(void)
|
||||||
{
|
{
|
||||||
/* Wait until a byte has been received or 1000us are passed */
|
/* Wait until a byte has been received or 1000us are passed */
|
||||||
waitfor(1000, pic_rxready);
|
waitfor(1000, pic_rxready);
|
||||||
|
|
||||||
/* Return the received byte */
|
/* Return the received byte */
|
||||||
return *(volatile uint8_t*)(&MCF_PSC3_PSCTB_8BIT); // Really 8-bit
|
return *(volatile uint8_t*)(&MCF_PSC3_PSCTB_8BIT); // Really 8-bit
|
||||||
}
|
}
|
||||||
|
|
||||||
void pic_init(void)
|
void pic_init(void)
|
||||||
@@ -271,13 +271,13 @@ void network_init(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register the DMA interrupt handler
|
* Register the DMA interrupt handler
|
||||||
*/
|
*/
|
||||||
handler = dma_interrupt_handler;
|
handler = dma_interrupt_handler;
|
||||||
vector = 112;
|
vector = 112;
|
||||||
|
|
||||||
if (!isr_register_handler(vector, handler, NULL,NULL))
|
if (!isr_register_handler(vector, handler, NULL,NULL))
|
||||||
{
|
{
|
||||||
dbg("%s: Error: Unable to register handler for vector %s\r\n", __FUNCTION__, vector);
|
dbg("%s: Error: Unable to register handler for vector %s\r\n", __FUNCTION__, vector);
|
||||||
return;
|
return;
|
||||||
@@ -384,22 +384,22 @@ void BaS(void)
|
|||||||
#ifdef _NOT_USED_
|
#ifdef _NOT_USED_
|
||||||
screen_init();
|
screen_init();
|
||||||
|
|
||||||
/* experimental */
|
/* experimental */
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
uint32_t *scradr = 0xd00000;
|
uint32_t *scradr = 0xd00000;
|
||||||
|
|
||||||
for (i = 0; i < 100; i++)
|
for (i = 0; i < 100; i++)
|
||||||
{
|
{
|
||||||
uint32_t *p = scradr;
|
uint32_t *p = scradr;
|
||||||
|
|
||||||
for (p = scradr; p < scradr + 1024 * 150L; p++)
|
|
||||||
{
|
|
||||||
*p = 0xffffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (p = scradr; p < scradr + 1024 * 150L; p++)
|
for (p = scradr; p < scradr + 1024 * 150L; p++)
|
||||||
{
|
{
|
||||||
|
*p = 0xffffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (p = scradr; p < scradr + 1024 * 150L; p++)
|
||||||
|
{
|
||||||
*p = 0x0;
|
*p = 0x0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -442,10 +442,11 @@ void BaS(void)
|
|||||||
|
|
||||||
/* Jump into the OS */
|
/* Jump into the OS */
|
||||||
typedef void void_func(void);
|
typedef void void_func(void);
|
||||||
typedef struct {
|
struct rom_header
|
||||||
|
{
|
||||||
void *initial_sp;
|
void *initial_sp;
|
||||||
void_func *initial_pc;
|
void_func *initial_pc;
|
||||||
} ROM_HEADER;
|
};
|
||||||
|
|
||||||
xprintf("BaS initialization finished, enable interrupts\r\n");
|
xprintf("BaS initialization finished, enable interrupts\r\n");
|
||||||
enable_coldfire_interrupts();
|
enable_coldfire_interrupts();
|
||||||
@@ -454,6 +455,6 @@ void BaS(void)
|
|||||||
network_init();
|
network_init();
|
||||||
|
|
||||||
xprintf("call EmuTOS\r\n");
|
xprintf("call EmuTOS\r\n");
|
||||||
ROM_HEADER* os_header = (ROM_HEADER*)TOS;
|
struct rom_header *os_header = (struct rom_header *) TOS;
|
||||||
os_header->initial_pc();
|
os_header->initial_pc();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user