summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/HAL/avr/atmega1281/common/include/halClkCtrl.h
blob: 6bc7a11de2c3bbc4fde21fd4abd81b42debd5857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**************************************************************************//**
  \file  halClkCtrl.h

  \brief Declarations of clock control hardware-dependent module.

  \author
      Atmel Corporation: http://www.atmel.com \n
      Support email: avr@atmel.com

    Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
    Licensed under Atmel's Limited License Agreement (BitCloudTM).

  \internal
    History:
      29/05/07 E. Ivanov - Created
      16/04/09 A. Khromykh - Refactored
 ******************************************************************************/
/******************************************************************************
 *   WARNING: CHANGING THIS FILE MAY AFFECT CORE FUNCTIONALITY OF THE STACK.  *
 *   EXPERT USERS SHOULD PROCEED WITH CAUTION.                                *
 ******************************************************************************/

#ifndef _HALCLKCTRL_H
#define _HALCLKCTRL_H

/******************************************************************************
                   Includes section
******************************************************************************/
#include <types.h>
#include <halFCPU.h>

/******************************************************************************
                   Types section
******************************************************************************/
/**************************************************************************//**
\brief Possible clock source
******************************************************************************/
typedef enum
{
  INTERNAL_RC,
  OTHER_SOURCE
} ClkSource_t;

/******************************************************************************
                   Prototypes section
******************************************************************************/
/**************************************************************************//**
\brief Initialization system clock.
******************************************************************************/
void halInitFreq(void);

/**************************************************************************//**
\brief Return clock source

\return
  clock source.
******************************************************************************/
ClkSource_t halGetClockSource(void);

/**************************************************************************//**
\brief System clock.

\return
  system clock in Hz.
******************************************************************************/
uint32_t HAL_ReadFreq(void);

#endif /* _HALCLKCTRL_H */

// eof halClkCtrl.h