/* L6- Intercomunicare prin BT dintre telefon mobil cu XMC Boot kit Byte Display format din LEDuri conectate astfel: D0 - P1.4 D1 - P0.0 D2 - P0.1 D3 - P0.2 D4 - P0.3 D5 - P0.4 D6 - P0.12 D7 - P0.8 Modul Bluetooth conectat astfel: P1.3 (XMC - Tx, BT- Rx) P1.2 (XMC - Rx, BT- Tx */ #include //Declarations from DAVE Code Generation (includes SFR declaration) int main(void) { DAVE_Init(); BUS_IO_Write (&byte, 0xFF); //sting leduri char c; UART_SetRXFIFOTriggerLimit(&UART_0, 0); // buffer 1 caracter while(1U) { if(UART_GetRXFIFOStatus(&UART_0)) // caracater disponibil { UART_ClearRXFIFOStatus(&UART_0, 1); // anuleaza stare c= UART_GetReceivedWord (&UART_0); // receptie caracter BUS_IO_Write (&byte, c^0xff); // afisare pe byteLED /* Cod identifivare caracter si executie actiune */ } } return 1; }