gpio.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /****************************************************************************
  2. ****************************************************************************
  3. * Software that is described herein is for illustrative purposes only
  4. * which provides customers with programming information regarding the
  5. * products. This software is supplied "AS IS" without any warranties.
  6. * NXP Semiconductors assumes no responsibility or liability for the
  7. * use of the software, conveys no license or title under any patent,
  8. * copyright, or mask work right to the product. NXP Semiconductors
  9. * reserves the right to make changes in the software without
  10. * notification. NXP Semiconductors also make no representation or
  11. * warranty that such application will be suitable for the specified
  12. * use without further testing or modification.
  13. * Permission to use, copy, modify, and distribute this software and its
  14. * documentation is hereby granted, under NXP Semiconductors'
  15. * relevant copyright in the software, without fee, provided that it
  16. * is used in conjunction with NXP Semiconductors microcontrollers. This
  17. * copyright, permission, and disclaimer notice must appear in all copies of
  18. * this code.
  19. ****************************************************************************/
  20. #ifndef __LPC8XX_GPIO_H
  21. #define __LPC8XX_GPIO_H
  22. #define INPUT 0
  23. #define OUTPUT 1
  24. #define PORT0 0
  25. #define PORT1 1
  26. #define Bit0 0
  27. #define Bit1 1
  28. #define Bit2 2
  29. #define Bit3 3
  30. #define Bit4 4
  31. #define Bit5 5
  32. #define Bit6 6
  33. #define Bit7 7
  34. #define Bit8 8
  35. #define Bit9 9
  36. #define Bit10 10
  37. #define Bit11 11
  38. #define Bit12 12
  39. #define Bit13 13
  40. #define Bit14 14
  41. #define Bit15 15
  42. #define Bit16 16
  43. #define Bit17 17
  44. #define Bit18 18
  45. #define Bit19 19
  46. #define Bit20 20
  47. #define Bit21 21
  48. #define Bit22 22
  49. #define Bit23 23
  50. #define Bit24 24
  51. #define Bit25 25
  52. #define Bit26 26
  53. #define Bit27 27
  54. #define Bit28 28
  55. #define Bit29 29
  56. #define Bit30 30
  57. #define Bit31 31
  58. void PININT_Handler ( uint32_t irq_num );
  59. void PININT0_IRQHandler(void);
  60. void PININT1_IRQHandler(void);
  61. void PININT2_IRQHandler(void);
  62. void PININT3_IRQHandler(void);
  63. void PININT4_IRQHandler(void);
  64. void PININT5_IRQHandler(void);
  65. void PININT6_IRQHandler(void);
  66. void PININT7_IRQHandler(void);
  67. void GPIOInit( void );
  68. uint32_t GPIOGetPinValue( uint32_t portNum, uint32_t bitPosi );
  69. void GPIOSetBitValue( uint32_t portNum, uint32_t bitPosi, uint32_t bitVal );
  70. void GPIOSetDir( uint32_t portNum, uint32_t bitPosi, uint32_t dir );
  71. #endif /* end __LPC8XX_GPIO_H */
  72. /*****************************************************************************
  73. ** End Of File
  74. ******************************************************************************/