| AVR Z-LINKŪ |

# chat.h

Go to the documentation of this file.

    00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
    00023 #ifndef CHAT_H
    00024 #define CHAT_H
    00025 /* === Includes ============================================================ */
    00026 #include<stdint.h>
    00027 #include<stdbool.h>
    00028 /* ==== Macros ============================================================= */
    00029 #define DEFAULT_CHANNEL                         ( 0x0B )
    00030 #define DEFAULT_PANID                           ( 0xBAAD )
    00031
    00032 #define COORD_SHORT_ADDRESS             ( 0x0000 )
    00033 #define END_DEVICE_SHORT_ADDRESS        ( 0x0001 )
    00034
    00035 #define SCANDURATION                            ( 0x03 )
    00036
    00037 #define MAX_MSG_LENGTH                          ( 0x1E )
    00038 /* === Typedefs ============================================================ */
    00039
    00042 typedef enum{
    00043
    00044         CHAT_IDLE = 0x00,
    00045         CHAT_RESET_PENDING,
    00046         CHAT_ACTIVE_SCAN_PENDING,
    00047         CHAT_SET_ADDRESS_PENDING,
    00048         CHAT_START_PENDING,
    00049         CHAT_SET_PERMIT_ASSOCIATION_PENDING,
    00050
    00051         CHAT_WAIT_FOR_ASSOCIATION,
    00052
    00053         CHAT_ASSOCIATION_PENDING,
    00054         CHAT_CONNECTED,
    00055 }chatState_t;
    00056
    00059 typedef enum{
    00060
    00061         UNDEFINED = 0x30,
    00062         COORDINATOR,
    00063         END_DEVICE
    00064 }chatRole_t;
    00065
    00068 typedef enum{
    00069
    00070         UNKNOWN_AT_COMMAND = 0x80,//0x80
    00071         EVENT_BUFFER_FULL,      //0x81
    00072         INVALID_REQUEST,        //0x82
    00073         RESET_FAILED,   //0x83
    00074         UNKNOWN_DEVICE_TYPE,    //0x84
    00075         INCONSISTENT_STATE,     //0x85
    00076         ACTIVE_SCAN_FAILED,     //0x86
    00077         SET_MAC_ADDRESS_FAILED, //0x87
    00078         START_NETWORK_FAILED,   //0x88
    00079         ASSOCIATION_FAILED,     //0x89
    00080         DATA_TRANSMISSION_FAILED,       //0x8A
    00081         DATA_CONVERSION_FAILED          //0x8B
    00082 }chatError_t;
    00083 /* === Static Variables ==================================================== */
    00084 extern chatState_t state;
    00085 extern chatRole_t role;
    00086
    00087 extern uint8_t chatChannel;
    00088 extern uint16_t chatPANID;
    00089
    00090 #endif

@DOC_TITLE@