Where can I find a tutorial for ButtonsPoll and Button_Pressed API's?
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.
Where can I find a tutorial for ButtonsPoll and Button_Pressed API's?
Hello Vikas,
The prototype can be found in drivers for every board examples. There is no tutorial document as such.
C:\ti\TivaWare_C_Series-2.1.0.12573\examples\boards\ek-tm4c123gxl-boostxl-senshub\drivers
Regards
Amit
hello i could erase the other error but now i have other hope you could help me this is the code
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "examples\boards\ek-tm4c123gxl\drivers\buttons.h"
int PinData=2;
unsigned char ucDelta = 0;
unsigned char ua = 0;
unsigned char ucState =0;
int main(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);
while(1)
{
ucState = ButtonsPoll(&ucDelta, &ua);
if (BUTTON_PRESSED(LEFT_BUTTON, ucState, ucDelta))
{
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, PinData);
SysCtlDelay(40000000);
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0x00);
SysCtlDelay(40000000);
//if(PinData==8) {PinData=2;} else {PinData=PinData*2;}
}
else {GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0x0E);}
}
}
and these are the erros
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "lab3.out" not built