![Microchip Technology ATWINC 15x0 Скачать руководство пользователя страница 23](http://html1.mh-extra.com/html/microchip-technology/atwinc-15x0/atwinc-15x0_developers-manual_1785757023.webp)
• button[input] 1: SW1; 2: SW2; 3: SW3
Return: 0: success; -1: fail
– int regButtonLongPressDetectCallback(void* cb, int button);
Usage: Register callback function for the button short press detect.
Parameters:
• cb [input]callback function trigger when long press button is detected
• button[input] 1: SW1; 2: SW2; 3: SW3
Return: socket index;
– int unRegButtonLongPressDetectCallback(int sock, int button);
Usage: Unregister callback function for the button long press detect.
Parameters:
• sock [input]socket index that represent the registration
• button[input] 1: SW1; 2: SW2; 3: SW3
Return: 0: success; -1: fail;
4.
LED
– void initialise_led(void);
Usage: Initializes GPIO for LED control.
Parameters: N/A
– void led_ctrl_set_color(Led_Color color, Led_Mode mode);
Usage: Set LED color and mode.
Parameters:
• color [input]LED color options
• mode[input] LED mode: on/off/ blink normal/blink fast/blink slow
– void led_ctrl_set_mode(Led_Mode mode);
Usage: Set LED blink mode.
Parameters:
• mode[input] LED mode: on/ off/ blink normal/blink fast/blink slow
– void toggleLED(void);
Usage: Toggle LED on/off state.
Parameters: N/A
– Led_Color led_ctrl_get_color(void)
Usage: Gets LED color.
Parameters: N/A
Return: Led_Color
5.
ENV_SENSOR
– void env_sensor_data_init(void);
Usage: Gets the initialize value of the environment sensor and light sensor.
Parameters: N/A
– void env_sensor_execute(void)
ATWINC15x0 Smart Device Kit
Application Firmware
©
2019 Microchip Technology Inc.
User Guide
DS50002885A-page 23