summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/rfCalibration.h
blob: b3e06d56b9fc390fa5d837184d8a16c7d66cd2ba (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
71
72
73
74
75
76
77
78
/**************************************************************************//**
  \file rfCalibration.h

  \brief Interface for PLL calibration and filter tuning.

  \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:
    2011-10-04 Max Gekk - Created.
   Last change:
    $Id: rfCalibration.h 18970 2011-10-21 12:48:41Z mgekk $
 ******************************************************************************/
#if !defined _RFCALIBRATION_H
#define _RFCALIBRATION_H

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

/******************************************************************************
                                 Types section
 ******************************************************************************/
/**
 * \brief RF calibration status type.
 *
 * - RF_CALIBRATION_SUCCESS_STATUS means that the calibration cycle has finished
 *     successfuly and the radio chip is ready to work.                        
 * - RF_CALIBRATION_FAIL_STATUS - MAC hardware depended subsystem cannot preform
 *   the calibration at this time.
 **/
typedef enum _RF_CalibrationStatus_t
{
  RF_CALIBRATION_SUCCESS_STATUS,  
  RF_CALIBRATION_FAIL_STATUS
} RF_CalibrationStatus_t;

/**//**
 * \brief The structure declaration of RF calibration confirmation parameters.
 */
typedef struct _RF_CalibrationConf_t
{
  RF_CalibrationStatus_t status;  
} RF_CalibrationConf_t;

/**//**
 * \brief Parameters of RF Calibration request.
 */
typedef struct _RF_CalibrationReq_t
{
  /*! Service field - for internal needs. */
  MAC_Service_t  service;

  /** RF Calibration confirm callback function's pointer. */
  void (*RF_CalibrationConf)(RF_CalibrationConf_t *conf);
  /** Status of processing this request. */
  RF_CalibrationConf_t confirm;
} RF_CalibrationReq_t;

/******************************************************************************
                              Prototypes section
 ******************************************************************************/
/**************************************************************************//**
  \brief initiates a calibration cycle. 

  \param[in] req - pointer to calibration parameters - callback and conf status.
  \return None.
 ******************************************************************************/
void RF_CalibrationReq(RF_CalibrationReq_t *const req);

#endif /* _RFCALIBRATION_H */
/** eof rfCalibration.h */