/**
 * @file timer.h
 * @brief Timer Module header
 *
 * This module groups the functions which are used to configure the timer A of the MSP432P401R
 *
 * timer.h
 * The module is used to configure the timer A in order to set interrupts after some defined time elapsed
 *
 * @authors Leonardo Mart�nez <leonardo.martinez.hornak@fing.edu.uy>, Isabel Morales <imorales@fing.edu.uy>
 * @version 1.0
 * @date May 22, 2021
 */

#ifndef INCLUDE_TIMER_H_
#define INCLUDE_TIMER_H_

/**
 * @brief Configure timer A to use SMCLK and generate interrupts every millisecond
 */
void configureTimer(void);

/**
* @brief Obtains the current time in milliseconds
* @return unsigned int time: Time in milliseconds
*/
unsigned int getCurrentTime(void);

/**
 * @brief Sets callback function to be added from this module to the function queue
 * @param void* callback_function: function to be called when the timer elapsed the defined long time.
 * It is configured modifying SLOW_ISR_FUNCTION_CALL
 *
 */
void setSlowFunctionISRCallbackFunction(void *callback_function);

/**
 * @brief Sets callback function to be added from this module to the function queue
 * @param void* callback_function: function to be called when the timer elapsed the defined short time.
 * It is configured modifying FAST_ISR_FUNCTION_CALL
 *
 */
void setFastFunctionISRCallbackFunction(void *callback_function);

#endif /* INCLUDE_TIMER_H_ */