Advertisement
ace_ventura

events.c

Mar 29th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 5.06 KB | None | 0 0
  1. /* ###################################################################
  2. **     Filename    : Events.c
  3. **     Project     : semaforo
  4. **     Processor   : MKL25Z128VLK4
  5. **     Component   : Events
  6. **     Version     : Driver 01.00
  7. **     Compiler    : GNU C Compiler
  8. **     Date/Time   : 2017-03-29, 15:21, # CodeGen: 0
  9. **     Abstract    :
  10. **         This is user's event module.
  11. **         Put your event handler code here.
  12. **     Settings    :
  13. **     Contents    :
  14. **         Cpu_OnNMIINT - void Cpu_OnNMIINT(void);
  15. **
  16. ** ###################################################################*/
  17. /*!
  18. ** @file Events.c
  19. ** @version 01.00
  20. ** @brief
  21. **         This is user's event module.
  22. **         Put your event handler code here.
  23. */        
  24. /*!
  25. **  @addtogroup Events_module Events module documentation
  26. **  @{
  27. */        
  28. /* MODULE Events */
  29.  
  30. #include "Cpu.h"
  31. #include "Events.h"
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37.  
  38. /* User includes (#include below this line is not maintained by Processor Expert) */
  39.  
  40. /*
  41. ** ===================================================================
  42. **     Event       :  Cpu_OnNMIINT (module Events)
  43. **
  44. **     Component   :  Cpu [MKL25Z128LK4]
  45. */
  46. /*!
  47. **     @brief
  48. **         This event is called when the Non maskable interrupt had
  49. **         occurred. This event is automatically enabled when the [NMI
  50. **         interrupt] property is set to 'Enabled'.
  51. */
  52. /* ===================================================================*/
  53. void Cpu_OnNMIINT(void)
  54. {
  55.   /* Write your code here ... */
  56. }
  57.  
  58. /*
  59. ** ===================================================================
  60. **     Event       :  ped_button_OnInterrupt (module Events)
  61. **
  62. **     Component   :  ped_button [ExtInt]
  63. **     Description :
  64. **         This event is called when an active signal edge/level has
  65. **         occurred.
  66. **     Parameters  : None
  67. **     Returns     : Nothing
  68. ** ===================================================================
  69. */
  70. void ped_button_OnInterrupt(void) // Interrupção do botão de pedestres
  71. {
  72.     extern int button;
  73.     button = 1;
  74. }
  75.  
  76. /*
  77. ** ===================================================================
  78. **     Event       :  light_sens_OnEnd (module Events)
  79. **
  80. **     Component   :  light_sens [ADC]
  81. **     Description :
  82. **         This event is called after the measurement (which consists
  83. **         of <1 or more conversions>) is/are finished.
  84. **         The event is available only when the <Interrupt
  85. **         service/event> property is enabled.
  86. **     Parameters  : None
  87. **     Returns     : Nothing
  88. ** ===================================================================
  89. */
  90. void light_sens_OnEnd(void)
  91. {
  92.   /* Write your code here ... */
  93. }
  94.  
  95. /*
  96. ** ===================================================================
  97. **     Event       :  light_sens_OnCalibrationEnd (module Events)
  98. **
  99. **     Component   :  light_sens [ADC]
  100. **     Description :
  101. **         This event is called when the calibration has been finished.
  102. **         User should check if the calibration pass or fail by
  103. **         Calibration status method./nThis event is enabled only if
  104. **         the <Interrupt service/event> property is enabled.
  105. **     Parameters  : None
  106. **     Returns     : Nothing
  107. ** ===================================================================
  108. */
  109. void light_sens_OnCalibrationEnd(void)
  110. {
  111.   /* Write your code here ... */
  112. }
  113.  
  114. /*
  115. ** ===================================================================
  116. **     Event       :  TI1_OnInterrupt (module Events)
  117. **
  118. **     Component   :  TI1 [TimerInt]
  119. **     Description :
  120. **         When a timer interrupt occurs this event is called (only
  121. **         when the component is enabled - <Enable> and the events are
  122. **         enabled - <EnableEvent>). This event is enabled only if a
  123. **         <interrupt service/event> is enabled.
  124. **     Parameters  : None
  125. **     Returns     : Nothing
  126. ** ===================================================================
  127. */
  128. void TI1_OnInterrupt(void) // Interrupção para contagem
  129. {
  130.     extern unsigned int count_1;
  131.     extern unsigned int count_2;   
  132.     count_1++;
  133.     count_2++;
  134. }
  135.  
  136. /*
  137. ** ===================================================================
  138. **     Event       :  TI1_OnInterrupt (module Events)
  139. **
  140. **     Component   :  TI1 [TimerInt]
  141. **     Description :
  142. **         When a timer interrupt occurs this event is called (only
  143. **         when the component is enabled - <Enable> and the events are
  144. **         enabled - <EnableEvent>). This event is enabled only if a
  145. **         <interrupt service/event> is enabled.
  146. **     Parameters  : None
  147. **     Returns     : Nothing
  148. ** ===================================================================
  149. */
  150.  
  151.  
  152. /* END Events */
  153.  
  154. #ifdef __cplusplus
  155. }  /* extern "C" */
  156. #endif
  157.  
  158. /*!
  159. ** @}
  160. */
  161. /*
  162. ** ###################################################################
  163. **
  164. **     This file was created by Processor Expert 10.3 [05.09]
  165. **     for the Freescale Kinetis series of microcontrollers.
  166. **
  167. ** ###################################################################
  168. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement