summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdData.h
blob: fa4e1c865f51918ed1bfa9b11c5524441ca14657 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*************************************************************************//** 
  \file machwdData.h

  \brief MACHWD data types types and function prototypes.

  \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:
      26/09/07 A. Mandychev - Created.
*****************************************************************************/

#ifndef _MACHWDDATA_H
#define _MACHWDDATA_H

/******************************************************************************
                    Includes section
******************************************************************************/
#include <machwdService.h>
#include <machwdSetTrx.h>
#include <macFrame.h>

/******************************************************************************
                    Define(s) section
******************************************************************************/

/******************************************************************************
                    Types section
******************************************************************************/
//! Set of frame transmission statuses.
typedef enum
{
  MACHWD_DATA_PENDING_DATA_STATUS,
  MACHWD_CHANNEL_ACCESS_FAIL_DATA_STATUS,
  MACHWD_NO_ACK_DATA_STATUS,
  MACHWD_SUCCESS_DATA_STATUS,
} MACHWD_DataStatus_t;

//! MACHWD data confirm structure.
typedef struct
{
  //! Frame transmission status.
  MACHWD_DataStatus_t status;
} MACHWD_DataConf_t;

//! MACHWD data request structure.
typedef struct
{
  //! Service field - for internal needs.
  MACHWD_Service_t  service;
  //! Description of the frame to be transmitted.
  MAC_FrameDescr_t  frameDescr;
  //! Command to set trx state after transmitting frame.
  MACHWD_TrxCmd_t   trxCmdToSetAfterTransmitTrxState;
  //! MACHWD data transmission confirm callback function's pointer.
  void (*MACHWD_DataConf)(MACHWD_DataConf_t *confParams);
  //! MACHWD confirm structure.
  MACHWD_DataConf_t confirm;
} MACHWD_DataReq_t;

//! MACHWD data indication structure.
typedef struct
{
  //! Received frame description.
  MAC_FrameDescr_t frameDescr;
} MACHWD_DataInd_t;

/******************************************************************************
                    Prototypes section
******************************************************************************/
/**************************************************************************//**
  \brief MACHWD data request primitive's prototype.
  \param reqParams - MACHWD data request's parameters' structure pointer.
  \return none.
******************************************************************************/
void MACHWD_DataReq(MACHWD_DataReq_t *reqParams);

/**************************************************************************//**
  \brief MACHWD data indication primitive's prototype.
  \param indParams - MACHWD data indication parameters' structure pointer.
  \return none.
******************************************************************************/
extern void MACHWD_DataInd(MACHWD_DataInd_t *indParams);

#endif /* _MACHWDDATA_H */

// eof machwdData.h