The following codes doesn't work, don't know why? please point out the faults, thanks.
*********************************************** SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C0); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); I2CMasterInitExpClk(I2C0_MASTER_BASE, SysCtlClockGet();, true); GPIOPinTypeI2C(GPIO_PORTB_BASE, GPIO_PIN_2 | GPIO_PIN_3 ); I2CMasterEnable(I2C0_MASTER_BASE); while(1) { while(I2CMasterBusBusy(I2C0_MASTER_BASE)) ; I2CMasterDataPut(I2C0_MASTER_BASE, 'U'); } *************************************************
Start posting your code correctly formatted with the pre tags as clearly described just above the message input box.
Then, we will be able to see on the indentation if a while loop is expected to be empty, or if it is expected to control the execution of a following statement.
Right now, your code is unreadable. When posted, it should look like:
#include <stdio.h> int main(void) { printf("Hello world!\n"); return 0; }