update readme

pull/8/head
Jaup 9 years ago
parent fb910ced93
commit 4440a2d7d8

@ -72,7 +72,8 @@ int read_button_pin()
int main()
{
button_init(&button1, read_button_pin, 0);
button_attach(&button1, SINGLE_CLICK, BTN1_SINGLE_CLICK_Handler);
button_attach(&button1, PRESSED, BTN1_PRESSED_Handler);
button_attach(&button1, CLICK, BTN1_CLICK_Handler);
button_attach(&button1, DOUBLE_CLICK, BTN1_DOUBLE_Click_Handler);
button_attach(&button1, LONG_RRESS_START, BTN1_LONG_RRESS_START_Handler);
button_attach(&button1, LONG_PRESS_HOLD, BTN1_LONG_PRESS_HOLD_Handler);

@ -5,8 +5,6 @@
#include "button.h"
#define HIGH 1
#define LOW 0
#define TICKS_INTERVAL 5 //ms
//According to your need to modify the constants.

@ -1,3 +1,8 @@
/*
* Copyright (c) 2016 Zibin Zheng <znbin@qq.com>
* All rights reserved
*/
#ifndef _BUTTON_H_
#define _BUTTON_H_

Loading…
Cancel
Save