This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: MSP432P401R
Tool/software: TI C/C++ Compiler
Hello,
I am trying to made a code I2C to cmsis registers, but i have some problems, I pick up the I2C.c file on the drivelib, and now i try transform the code to cmsis register, but I don't understand some pieces, can anyone help me? I litle example how can transform this piece of code:
//If interrupts are not used, poll for flags if (!BITBAND_PERI(EUSCI_B_CMSIS(moduleInstance)->IE, EUSCI_B_IE_TXIE0_OFS)) { //Poll for transmit interrupt flag. while (!BITBAND_PERI(EUSCI_B_CMSIS(moduleInstance)->IFG, EUSCI_B_IFG_TXIFG0_OFS)) ; } //Send single byte data. EUSCI_B_CMSIS(moduleInstance)->TXBUF = txData;
HI Amit Ashara ,
I don't understand the code "BITBAND_PERI", if i have to transform the code to cmsis I would put it in the following way...
if(EUSCI_B0->IE |= EUSCI_B_IE_TXIE0){ while(!(EUSCI_B0->IFG|= EUSCI_B_IFG_TXIFG0)); } //Send single byte data. EUSCI_B0->TXBUF = txData;
The problem is, all my code was writen CMSIS register, soo I need or I have to integrate this I2C lib in cmsis to work with my all code. And this is my difficulty
I dont understand the BITBAND_PERI, what he does
**Attention** This is a public forum