Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ###################################################################
- ** Filename : Events.c
- ** Project : semaforo
- ** Processor : MKL25Z128VLK4
- ** Component : Events
- ** Version : Driver 01.00
- ** Compiler : GNU C Compiler
- ** Date/Time : 2017-03-29, 15:21, # CodeGen: 0
- ** Abstract :
- ** This is user's event module.
- ** Put your event handler code here.
- ** Settings :
- ** Contents :
- ** Cpu_OnNMIINT - void Cpu_OnNMIINT(void);
- **
- ** ###################################################################*/
- /*!
- ** @file Events.c
- ** @version 01.00
- ** @brief
- ** This is user's event module.
- ** Put your event handler code here.
- */
- /*!
- ** @addtogroup Events_module Events module documentation
- ** @{
- */
- /* MODULE Events */
- #include "Cpu.h"
- #include "Events.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* User includes (#include below this line is not maintained by Processor Expert) */
- /*
- ** ===================================================================
- ** Event : Cpu_OnNMIINT (module Events)
- **
- ** Component : Cpu [MKL25Z128LK4]
- */
- /*!
- ** @brief
- ** This event is called when the Non maskable interrupt had
- ** occurred. This event is automatically enabled when the [NMI
- ** interrupt] property is set to 'Enabled'.
- */
- /* ===================================================================*/
- void Cpu_OnNMIINT(void)
- {
- /* Write your code here ... */
- }
- /*
- ** ===================================================================
- ** Event : ped_button_OnInterrupt (module Events)
- **
- ** Component : ped_button [ExtInt]
- ** Description :
- ** This event is called when an active signal edge/level has
- ** occurred.
- ** Parameters : None
- ** Returns : Nothing
- ** ===================================================================
- */
- void ped_button_OnInterrupt(void) // Interrupção do botão de pedestres
- {
- extern int button;
- button = 1;
- }
- /*
- ** ===================================================================
- ** Event : light_sens_OnEnd (module Events)
- **
- ** Component : light_sens [ADC]
- ** Description :
- ** This event is called after the measurement (which consists
- ** of <1 or more conversions>) is/are finished.
- ** The event is available only when the <Interrupt
- ** service/event> property is enabled.
- ** Parameters : None
- ** Returns : Nothing
- ** ===================================================================
- */
- void light_sens_OnEnd(void)
- {
- /* Write your code here ... */
- }
- /*
- ** ===================================================================
- ** Event : light_sens_OnCalibrationEnd (module Events)
- **
- ** Component : light_sens [ADC]
- ** Description :
- ** This event is called when the calibration has been finished.
- ** User should check if the calibration pass or fail by
- ** Calibration status method./nThis event is enabled only if
- ** the <Interrupt service/event> property is enabled.
- ** Parameters : None
- ** Returns : Nothing
- ** ===================================================================
- */
- void light_sens_OnCalibrationEnd(void)
- {
- /* Write your code here ... */
- }
- /*
- ** ===================================================================
- ** Event : TI1_OnInterrupt (module Events)
- **
- ** Component : TI1 [TimerInt]
- ** Description :
- ** When a timer interrupt occurs this event is called (only
- ** when the component is enabled - <Enable> and the events are
- ** enabled - <EnableEvent>). This event is enabled only if a
- ** <interrupt service/event> is enabled.
- ** Parameters : None
- ** Returns : Nothing
- ** ===================================================================
- */
- void TI1_OnInterrupt(void) // Interrupção para contagem
- {
- extern unsigned int count_1;
- extern unsigned int count_2;
- count_1++;
- count_2++;
- }
- /*
- ** ===================================================================
- ** Event : TI1_OnInterrupt (module Events)
- **
- ** Component : TI1 [TimerInt]
- ** Description :
- ** When a timer interrupt occurs this event is called (only
- ** when the component is enabled - <Enable> and the events are
- ** enabled - <EnableEvent>). This event is enabled only if a
- ** <interrupt service/event> is enabled.
- ** Parameters : None
- ** Returns : Nothing
- ** ===================================================================
- */
- /* END Events */
- #ifdef __cplusplus
- } /* extern "C" */
- #endif
- /*!
- ** @}
- */
- /*
- ** ###################################################################
- **
- ** This file was created by Processor Expert 10.3 [05.09]
- ** for the Freescale Kinetis series of microcontrollers.
- **
- ** ###################################################################
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement