DSP2803x_Gpio.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //###########################################################################
  2. //
  3. // FILE: DSP2803x_Gpio.c
  4. //
  5. // TITLE: DSP2803x General Purpose I/O Initialization & Support Functions.
  6. //
  7. //###########################################################################
  8. // $TI Release: F2803x C/C++ Header Files and Peripheral Examples V130 $
  9. // $Release Date: May 8, 2015 $
  10. // $Copyright: Copyright (C) 2009-2015 Texas Instruments Incorporated -
  11. // http://www.ti.com/ ALL RIGHTS RESERVED $
  12. //###########################################################################
  13. #include "DSP2803x_Device.h" // DSP2803x Headerfile Include File
  14. #include "DSP2803x_Examples.h" // DSP2803x Examples Include File
  15. //---------------------------------------------------------------------------
  16. // InitGpio:
  17. //---------------------------------------------------------------------------
  18. // This function initializes the Gpio to a known (default) state.
  19. //
  20. // For more details on configuring GPIO's as peripheral functions,
  21. // refer to the individual peripheral examples and/or GPIO setup example.
  22. void InitGpio(void)
  23. {
  24. EALLOW;
  25. //¿ØÖÆLED
  26. GpioCtrlRegs.GPAPUD.bit.GPIO22 = 0;
  27. GpioCtrlRegs.GPAMUX2.bit.GPIO22 = 0;
  28. GpioCtrlRegs.GPADIR.bit.GPIO22 = 1;
  29. EDIS;
  30. InitECanGpio();
  31. }
  32. void RunLedSet(void)
  33. {
  34. GpioDataRegs.GPASET.bit.GPIO14 = 1;
  35. }
  36. void RunLedClr(void)
  37. {
  38. GpioDataRegs.GPACLEAR.bit.GPIO14 = 1;
  39. }
  40. //===========================================================================
  41. // End of file.
  42. //===========================================================================