EXTLED.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*******************************************************************************
  2. * File Name: EXTLED.h
  3. * Version 2.10
  4. *
  5. * Description:
  6. * This file containts Control Register function prototypes and register defines
  7. *
  8. * Note:
  9. *
  10. ********************************************************************************
  11. * Copyright 2008-2014, Cypress Semiconductor Corporation. All rights reserved.
  12. * You may use this file only in accordance with the license, terms, conditions,
  13. * disclaimers, and limitations in the end user license agreement accompanying
  14. * the software package with which this file was provided.
  15. *******************************************************************************/
  16. #if !defined(CY_PINS_EXTLED_H) /* Pins EXTLED_H */
  17. #define CY_PINS_EXTLED_H
  18. #include "cytypes.h"
  19. #include "cyfitter.h"
  20. #include "cypins.h"
  21. #include "EXTLED_aliases.h"
  22. /* Check to see if required defines such as CY_PSOC5A are available */
  23. /* They are defined starting with cy_boot v3.0 */
  24. #if !defined (CY_PSOC5A)
  25. #error Component cy_pins_v2_10 requires cy_boot v3.0 or later
  26. #endif /* (CY_PSOC5A) */
  27. /* APIs are not generated for P15[7:6] */
  28. #if !(CY_PSOC5A &&\
  29. EXTLED__PORT == 15 && ((EXTLED__MASK & 0xC0) != 0))
  30. /***************************************
  31. * Function Prototypes
  32. ***************************************/
  33. void EXTLED_Write(uint8 value) ;
  34. void EXTLED_SetDriveMode(uint8 mode) ;
  35. uint8 EXTLED_ReadDataReg(void) ;
  36. uint8 EXTLED_Read(void) ;
  37. uint8 EXTLED_ClearInterrupt(void) ;
  38. /***************************************
  39. * API Constants
  40. ***************************************/
  41. /* Drive Modes */
  42. #define EXTLED_DM_ALG_HIZ PIN_DM_ALG_HIZ
  43. #define EXTLED_DM_DIG_HIZ PIN_DM_DIG_HIZ
  44. #define EXTLED_DM_RES_UP PIN_DM_RES_UP
  45. #define EXTLED_DM_RES_DWN PIN_DM_RES_DWN
  46. #define EXTLED_DM_OD_LO PIN_DM_OD_LO
  47. #define EXTLED_DM_OD_HI PIN_DM_OD_HI
  48. #define EXTLED_DM_STRONG PIN_DM_STRONG
  49. #define EXTLED_DM_RES_UPDWN PIN_DM_RES_UPDWN
  50. /* Digital Port Constants */
  51. #define EXTLED_MASK EXTLED__MASK
  52. #define EXTLED_SHIFT EXTLED__SHIFT
  53. #define EXTLED_WIDTH 1u
  54. /***************************************
  55. * Registers
  56. ***************************************/
  57. /* Main Port Registers */
  58. /* Pin State */
  59. #define EXTLED_PS (* (reg8 *) EXTLED__PS)
  60. /* Data Register */
  61. #define EXTLED_DR (* (reg8 *) EXTLED__DR)
  62. /* Port Number */
  63. #define EXTLED_PRT_NUM (* (reg8 *) EXTLED__PRT)
  64. /* Connect to Analog Globals */
  65. #define EXTLED_AG (* (reg8 *) EXTLED__AG)
  66. /* Analog MUX bux enable */
  67. #define EXTLED_AMUX (* (reg8 *) EXTLED__AMUX)
  68. /* Bidirectional Enable */
  69. #define EXTLED_BIE (* (reg8 *) EXTLED__BIE)
  70. /* Bit-mask for Aliased Register Access */
  71. #define EXTLED_BIT_MASK (* (reg8 *) EXTLED__BIT_MASK)
  72. /* Bypass Enable */
  73. #define EXTLED_BYP (* (reg8 *) EXTLED__BYP)
  74. /* Port wide control signals */
  75. #define EXTLED_CTL (* (reg8 *) EXTLED__CTL)
  76. /* Drive Modes */
  77. #define EXTLED_DM0 (* (reg8 *) EXTLED__DM0)
  78. #define EXTLED_DM1 (* (reg8 *) EXTLED__DM1)
  79. #define EXTLED_DM2 (* (reg8 *) EXTLED__DM2)
  80. /* Input Buffer Disable Override */
  81. #define EXTLED_INP_DIS (* (reg8 *) EXTLED__INP_DIS)
  82. /* LCD Common or Segment Drive */
  83. #define EXTLED_LCD_COM_SEG (* (reg8 *) EXTLED__LCD_COM_SEG)
  84. /* Enable Segment LCD */
  85. #define EXTLED_LCD_EN (* (reg8 *) EXTLED__LCD_EN)
  86. /* Slew Rate Control */
  87. #define EXTLED_SLW (* (reg8 *) EXTLED__SLW)
  88. /* DSI Port Registers */
  89. /* Global DSI Select Register */
  90. #define EXTLED_PRTDSI__CAPS_SEL (* (reg8 *) EXTLED__PRTDSI__CAPS_SEL)
  91. /* Double Sync Enable */
  92. #define EXTLED_PRTDSI__DBL_SYNC_IN (* (reg8 *) EXTLED__PRTDSI__DBL_SYNC_IN)
  93. /* Output Enable Select Drive Strength */
  94. #define EXTLED_PRTDSI__OE_SEL0 (* (reg8 *) EXTLED__PRTDSI__OE_SEL0)
  95. #define EXTLED_PRTDSI__OE_SEL1 (* (reg8 *) EXTLED__PRTDSI__OE_SEL1)
  96. /* Port Pin Output Select Registers */
  97. #define EXTLED_PRTDSI__OUT_SEL0 (* (reg8 *) EXTLED__PRTDSI__OUT_SEL0)
  98. #define EXTLED_PRTDSI__OUT_SEL1 (* (reg8 *) EXTLED__PRTDSI__OUT_SEL1)
  99. /* Sync Output Enable Registers */
  100. #define EXTLED_PRTDSI__SYNC_OUT (* (reg8 *) EXTLED__PRTDSI__SYNC_OUT)
  101. #if defined(EXTLED__INTSTAT) /* Interrupt Registers */
  102. #define EXTLED_INTSTAT (* (reg8 *) EXTLED__INTSTAT)
  103. #define EXTLED_SNAP (* (reg8 *) EXTLED__SNAP)
  104. #endif /* Interrupt Registers */
  105. #endif /* CY_PSOC5A... */
  106. #endif /* CY_PINS_EXTLED_H */
  107. /* [] END OF FILE */