void main(void)
{
M8C_EnableGInt;
M8C_ClearWDTAndSleep;
SPIS_Start(SPIS_SPI_MODE_0|SPIS_SPI_MSB_FIRST);
SPIS_SetupTxData(bInitSpiWriteBuffer[bCnt++]);
SPIS_EnableInt();
while(1)
{
M8C_ClearWDTAndSleep;
}
}
//-----------------------------------------------------------
//SPI interrupt_handler
//-----------------------------------------------------------
#pragma interrupt_handler MySPI_ISR
void MySPI_ISR(void)
{
SPIS_SetupTxData(bInitSpiWriteBuffer[bCnt++]);
} |