/******************************************************************************* * Function Name: isr_1_StartEx ******************************************************************************** * * Summary: * Set up the interrupt and enable it. * * Parameters: * address: Address of the ISR to set in the interrupt vector table. * * Return: * None * *******************************************************************************/ void isr_1_StartEx(cyisraddress address) { /* For all we know the interrupt is active. */ isr_1_Disable(); /* Set the ISR to point to the isr_1 Interrupt. */ isr_1_SetVector(address); /* Set the priority. */ isr_1_SetPriority((uint8)isr_1_INTC_PRIOR_NUMBER); /* Enable it. */ isr_1_Enable(); }
int main() { uint8 buffer[10] = {0}; int i; /* Place your initialization/startup code here (e.g. MyInst_Start()) */ CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */ UART_1_Start(); //UART_1_EnableTxInt(); //UART_1_EnableRxInt(); isr_1_StartEx(isr_1_isr); isr_1_Enable(); for(;;) { for(i = 0;i < 4;i++) { buffer[i] = rx_buffer[i]; } } }