|
- /*******************************************************************************
- * *
- * Copyright 2010 Rheinmetall Canada Inc. *
- * *
- * No part of this document may be reproduced, stored in *
- * a retrieval system, or transmitted, in any form or by any means, *
- * electronic, mechanical, photocopying, recording, or otherwise, *
- * without the prior written permission of Rheinmetall Canada Inc. *
- * *
- *******************************************************************************/
- /*
- Description:
- This is a template file for standard C header file.
-
- */
-
- /* ************************************************************************** */
- /* Revision:
- 000 20100616 HCAM
- Original version.
-
- ### YYYYMMDD Initial, Bug Identification
- Change description.
- */
-
- #ifndef TIMER_H
- #define TIMER_H
-
-
- /* ************************************************************************** */
- /* Includes */
- #include "define.h"
-
- /* ************************************************************************** */
- /* Defines */
-
-
- /* ************************************************************************** */
- /* Type definitions */
- typedef enum
- {
- HEARTBEAT_LED_TMR = 0,
- SLEEP_FCN_TIMER,
- WIFI_RECONNECT_TIMER,
- WIFI_TICK_TIMER,
- SYSLOG_TX_TIMER,
- BOOTLOADER_FLASH_POLL_TIMER,
- BUREAU_VOLUME_TRANSDUCER_TIMER,
- CUISINE_VOLUME_TRANSDUCER_TIMER,
- TIMER_MAX_ID
- }eTimerID;
-
- typedef struct
- {
- unsigned int uiStart;
- unsigned int uiMillisecCounter;
- unsigned int uiSecondCounter;
- unsigned int uiPeriodMillisec;
- unsigned int uiPeriodSecond;
- bool bRunning;
- } stTimer;
-
- /* ************************************************************************** */
- /* Prototypes */
- void TimerInit(void);
- int IsMilliSecTimerExpired(eTimerID p_eTimerID);
- int IsSecTimerExpired(eTimerID p_eTimerID);
- int IsTimerExpired(eTimerID p_eTimerID);
- void TimerStart(eTimerID p_eTimerID, unsigned int p_uiPeriod);
- void TimerStartSeconds(eTimerID p_eTimerID, unsigned int p_uiPeriod);
- void TimerStop(eTimerID p_eTimerID);
- void TimerReset(eTimerID p_eTimerID);
- bool IsTimerRunning(eTimerID p_eTimerID);
-
- void Sleep(unsigned int millisecs);
-
- #endif
- //EOF
|