TMS320F28335 Library  1.0
Documentation
General Output

This module can be used to configure a GPIO as a general output pin with two possible states: HIGH (3,3 V) and LOW (0 V).
Possible GPIO-values as input parameter are defined in global_defines.h and can also be seen in this overview table.


Code example

#include "global_defines.h" //Include global_defines.h
#include "general_output.h" //Include module of general_output
#include "system_controls.h" //Include module of system controls
void main(void){
int result = 0; //Optional: can be used to check return values of functions
setSystemControls(); //Call setSystemControls() function
result = init_generalOutputPin(GPIO0); //Configures GPIO0 as general output pin. Returns result of operation
result = generalOutputPin_setPinHigh(GPIO0); //Set output pin high (3,3 V). Returns result of operation
DELAY_US(150000); //Delay of 150 milliseconds
result = generalOutputPin_setPinLow(GPIO0); //Set output pin low (0 V). Returns result of operation
}

Documented C-Code of module:

general_output


Detailed description in Technical Reference Manual:

Technical_Reference_Manual

generalOutputPin_setPinHigh
int16 generalOutputPin_setPinHigh(Uint16 pin)
Set output pin high.
Definition: general_output.c:63
general_output.h
Header file for General Output module.
global_defines.h
Header file for global defines.
init_generalOutputPin
int16 init_generalOutputPin(Uint16 pin)
Configuration of GPIO as general output pin.
Definition: general_output.c:15
setSystemControls
void setSystemControls(void)
Configuration of system control register.
Definition: system_controls.c:13
generalOutputPin_setPinLow
int16 generalOutputPin_setPinLow(Uint16 pin)
Set output pin low.
Definition: general_output.c:88
system_controls.h
Header file for System Controls module.