summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWI/include/machwiPollHandler.h
blob: 10a0473695466b7021ba4dcde7df8e8ed44970fe (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
/******************************************************************************
  \file machwiPollHandler.h
  
  \brief MAC poll routine header file.
  
  \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:     
      09/07/07 ALuzhetsky - Created.
******************************************************************************/

#ifndef _MACHWIPOLLHANDLER_H
#define _MACHWIPOLLHANDLER_H

/******************************************************************************
                        Includes section.
******************************************************************************/
#include <macFrame.h>
#include <machwiManager.h>

/******************************************************************************
                        Typesa definition section
******************************************************************************/
/******************************************************************************
  MAC Hardware Independent part POLL handler possible states.
******************************************************************************/
typedef enum
{
  MACHWI_POLL_HANDLER_STATE_IDLE,
  MACHWI_POLL_HANDLER_STATE_DATA_REQ_TRANSMISSION,
  MACHWI_POLL_HANDLER_STATE_ANSWER_WAITING,
  MACHWI_POLL_HANDLER_STATE_TRX_STATE_SETTING,
} MachwiPollHandlerState_t;

/******************************************************************************
                        Prototypes section
******************************************************************************/
/******************************************************************************
  Resets poll handler.
  Parameters:
    none.
  Returns:
    none.
******************************************************************************/
void machwiResetPollHandler(void);

/******************************************************************************
  Indicates data reception to upper layer.
  Parameters:
    frameDescr - pointer to frame descriptor.
  Returns:
    none.
******************************************************************************/
void machwiDataIndication(MAC_FrameDescr_t *frameDescr);

/******************************************************************************
 Checks poll request parameters, sends data request commands.
 Waits for the data.
 Parameters:
   none.
 Returns:
   current status of operation (success or "in progress").
******************************************************************************/
MachwiHandlerResult_t machwiPollReqHandler(void);

/******************************************************************************
  Indicates, that data request frame was received.
  Parameters:
    pollDescr - Poll description.
  Returns:
    none.
******************************************************************************/
void machwiPollInd(MAC_FrameDescr_t *frameDescr);

#endif //_MACHWIPOLLHANDLER_H
// eof machwiPollHandler.h