Hello Quentin, To answer your first question, we unfortunately do not have any application notes or articles that cover DriverLib to Bit Field code conversion. However, you can include and use both DriverLib and Bit Field code in the same file to take advantage of both APIs. For more info for setting this approach up, see Section 2.3 in the file located at C:/ti/c2000/C2000Ware_ /device_support/f28002x/docs/F28002x_FRM_EX_UG.pdf In order to convert your DriverLib code to the Bit Field code you are requesting, I would advise using the GpioCtrlRegs.GPAxxx.all approach. See the code below: // Enable pullup on GPIO 4-7 GpioCtrlRegs.GPAPUD.all &= ~((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)); // Clear Data Regs for GPIO 4-7 GpioDataRegs.GPACLEAR.all |= (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7); // Set up mux for GPIO 4-7 and set GPIO 4-7 to output GpioCtrlRegs.GPAMUX1.all |= (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7); GpioCtrlRegs.GPADIR.all |= (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7); Best, Ryan
↧