summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macEnvironment.h
blob: 155f7983e71c65fae1ca7a49f59f881c7fc6ff05 (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
/**************************************************************************//**
  \file macEnvironment.h

  \brief Public interface of MAC Environment.

  \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:
    22/02/11 M. Gekk - Created.
 ******************************************************************************/
#ifndef _MAC_ENVIRONMENT_H
#define _MAC_ENVIRONMENT_H

/******************************************************************************
                               Includes section
 ******************************************************************************/
#include <macAddr.h>

/******************************************************************************
                              Prototypes section
 ******************************************************************************/
/**************************************************************************//**
  \brief Gets pointer to extended address.
  \return pointer to extended address.
 ******************************************************************************/
const ExtAddr_t* MAC_GetExtAddr(void);

/**************************************************************************//**
  \brief Sets extended address.
  \param extAddr - extended address.

  \return none.
 ******************************************************************************/
void MAC_SetExtAddr(const ExtAddr_t *const extAddr);

/**************************************************************************//**
  \brief Checks, if extended address is equal to our own one
  \param extAddr - pointer to extended address to check

  \return true, if extended address is equal to our own one; false - otherwise
 ******************************************************************************/
bool MAC_IsOwnExtAddr(const ExtAddr_t *const extAddr);

/**************************************************************************//**
  \brief Convert octet amount to transmit duration.
  \param octets - number of octets.

  \return Time of octets transmission in milliseconds.
 ******************************************************************************/
uint32_t MAC_GetOctetsTransmissionTimeInMs(const uint32_t octets);

#endif /* _MAC_ENVIRONMENT_H */
/** eof macEnvironment.h */