Other Parts Discussed in Thread: SYSCONFIG
I have some sysconfig-based code that works (for example, led_ex1_blinky) and wish to convert it to a non sysconfig-based project (for example, adc_ex1_epwm_input_cpu2) and am wondering how to proceed?
That is, for setup I think I have, in the sysconfig project:
GPIO_setPadConfig(STATUS1, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(STATUS1, GPIO_QUAL_SYNC);
GPIO_setDirectionMode(STATUS1, GPIO_DIR_MODE_OUT);
GPIO_setControllerCore(STATUS1, GPIO_CORE_CPU2);
and for operation I have:
GPIO_writePin(STATUS1, 0);
if (GPIO_readPin(CONTROL1)) ...
what are the equivalents if I'm not using sysconfig? I think it's:
#define STATUS1 30 // GPIO30 (amber LED)
GPIO_SetupPinOptions(STATUS1, true , GPIO_SYNC); // STATUS1 is an output, not input, and syncs with PLLsysclk with standard push-pull
GPIO_SetupPinMux(STATUS1, GPIO_MUX_CPU2, 0); // STATUS1 is on CPU2, mux position 0 (a GPIO)
and
GPIO_WritePin(STATUS1, 1);
if (GPIO_ReadPin(CONTROL1)) ...
but this doesn't seem to work. What did I miss?