Das sind diese APIs von denen ich geredet habe. #include "types.h" #include "configServer.h" #include "appTimer.h" #include "zdo.h" #include "gpio.h" #include "adc.h" #include "irq.h" #ifdef _SLIDERS_ #include "sliders.h" #endif // _SLIDERS_ #ifdef _LEDS_ #include "leds.h" #endif // _LEDS_ #ifdef _DBG_ #include #endif // _DBG_ #ifdef TEST_NETWORK #undef _SLIDERS_ #undef _BUTTONS_ #endif // TEST_NETWORK #define APP_MAX_NWK_ADDR 7 // Only 8 nodes are supported by application #define APP_MAX_DATA_SIZE (APS_MAX_ASDU_SIZE - 1) #ifndef APP_JOINING_INDICATION_PERIOD #define APP_JOINING_INDICATION_PERIOD 500L // Period of blinking during starting network #endif #define APP_DATA_TRANSMISSION_DELAY 30 #ifndef APP_TMP_DATA_BUFFER_SIZE #define APP_TMP_DATA_BUFFER_SIZE (255) #endif #define APP_ENDPOINT 1 // Endpoint will be useed #define APP_PROFILE_ID 1 // Profile Id will be used #define APP_CLUSTER_ID 1 // Cluster Id will be used // Leds aliases definition hardware platform supported if #ifdef _LEDS_ #define APP_NETWORK_STATUS_LED LED_YELLOW // Network status LED #define APP_RECEIVING_STATUS_LED LED_RED // Data receiving status LED // #define APP_SENDING_STATUS_LED LED_GREEN // Data transmission status LED #define LED_1 LED_FOURTH #define LED_2 LED_FIFTH #define LED_3 LED_SIXTH #define LED_4 LED_SEVENTH #endif // _LEDS_ // Common application state definition typedef enum { APP_INITIAL_STATE, // Initial state APP_NETWORK_JOINING_STATE, // Attempting join network state APP_NETWORK_JOINED_STATE, // Successfull joined state (networking) APP_ERROR_STATE // Error state (runtime error occured) } AppState_t; // TEST typedef enum { DEVICE_ACTIVE_IDLE_STATE, // Device is not in sleep state and the temperature must be measured DEVICE_MEASURING_STATE, // Temperature measuring DEVICE_MESSAGE_SENDING_STATE, // Current temperature sending to the coordinator DEVICE_SLEEP_PREPARE_STATE, // Message was sent successfully. Node ready to sleep. DEVICE_SLEEP_STATE, // Actually sleep state DEVICE_AWAKENING_STATE // Node was interrupted. Awakening. } AppDeviceState_t;