LibDriver MULTI_BUTTON
Loading...
Searching...
No Matches
driver_multi_button.h File Reference

driver multi_button header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for driver_multi_button.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  multi_button_s
 multi_button structure definition More...
struct  multi_button_time_s
 multi_button time structure definition More...
struct  multi_button_decode_s
 multi_button decode structure definition More...
struct  multi_button_single_s
 multi_button single structure definition More...
struct  multi_button_handle_s
 multi_button handle structure definition More...
struct  multi_button_info_s
 multi_button information structure definition More...

Macros

#define MULTI_BUTTON_NUMBER   128
 multi_button max number definition
#define MULTI_BUTTON_EACH_LENGTH   16
 multi_button each length definition
#define DRIVER_MULTI_BUTTON_LINK_INIT(HANDLE, STRUCTURE)
 initialize multi_button_handle_t structure
#define DRIVER_MULTI_BUTTON_LINK_MATRIX_INIT(HANDLE, FUC)
 link matrix_init function
#define DRIVER_MULTI_BUTTON_LINK_MATRIX_DEINIT(HANDLE, FUC)
 link matrix_deinit function
#define DRIVER_MULTI_BUTTON_LINK_MATRIX_WRITE_ROW(HANDLE, FUC)
 link matrix_write_row function
#define DRIVER_MULTI_BUTTON_LINK_MATRIX_READ_ROW(HANDLE, FUC)
 link matrix_read_row function
#define DRIVER_MULTI_BUTTON_LINK_TIMESTAMP_READ(HANDLE, FUC)
 link timestamp_read function
#define DRIVER_MULTI_BUTTON_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_MULTI_BUTTON_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function
#define DRIVER_MULTI_BUTTON_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
 link receive_callback function

Typedefs

typedef struct multi_button_s multi_button_t
 multi_button structure definition
typedef struct multi_button_time_s multi_button_time_t
 multi_button time structure definition
typedef struct multi_button_decode_s multi_button_decode_t
 multi_button decode structure definition
typedef struct multi_button_single_s multi_button_single_t
 multi_button single structure definition
typedef struct multi_button_handle_s multi_button_handle_t
 multi_button handle structure definition
typedef struct multi_button_info_s multi_button_info_t
 multi_button information structure definition

Enumerations

enum  multi_button_status_t {
  MULTI_BUTTON_STATUS_PRESS = (1 << 0) , MULTI_BUTTON_STATUS_RELEASE = (1 << 1) , MULTI_BUTTON_STATUS_SINGLE_CLICK = (1 << 2) , MULTI_BUTTON_STATUS_DOUBLE_CLICK = (1 << 3) ,
  MULTI_BUTTON_STATUS_TRIPLE_CLICK = (1 << 4) , MULTI_BUTTON_STATUS_REPEAT_CLICK = (1 << 5) , MULTI_BUTTON_STATUS_SHORT_PRESS_START = (1 << 6) , MULTI_BUTTON_STATUS_SHORT_PRESS_END = (1 << 7) ,
  MULTI_BUTTON_STATUS_LONG_PRESS_START = (1 << 8) , MULTI_BUTTON_STATUS_LONG_PRESS_HOLD = (1 << 9) , MULTI_BUTTON_STATUS_LONG_PRESS_END = (1 << 10)
}
 check range More...

Functions

uint8_t multi_button_info (multi_button_info_t *info)
 get chip's information
uint8_t multi_button_init (multi_button_handle_t *handle, uint8_t row, uint8_t col)
 initialize the chip
uint8_t multi_button_deinit (multi_button_handle_t *handle)
 close the chip
uint8_t multi_button_process (multi_button_handle_t *handle)
 process
uint8_t multi_button_set_timeout (multi_button_handle_t *handle, uint32_t us)
 set timeout
uint8_t multi_button_get_timeout (multi_button_handle_t *handle, uint32_t *us)
 get timeout
uint8_t multi_button_set_interval (multi_button_handle_t *handle, uint32_t us)
 set interval
uint8_t multi_button_get_interval (multi_button_handle_t *handle, uint32_t *us)
 get interval
uint8_t multi_button_set_short_time (multi_button_handle_t *handle, uint32_t us)
 set short time
uint8_t multi_button_get_short_time (multi_button_handle_t *handle, uint32_t *us)
 get short time
uint8_t multi_button_set_long_time (multi_button_handle_t *handle, uint32_t us)
 set long time
uint8_t multi_button_get_long_time (multi_button_handle_t *handle, uint32_t *us)
 get long time
uint8_t multi_button_set_repeat_time (multi_button_handle_t *handle, uint32_t us)
 set repeat time
uint8_t multi_button_get_repeat_time (multi_button_handle_t *handle, uint32_t *us)
 get repeat time
uint8_t multi_button_set_repeat_cnt (multi_button_handle_t *handle, uint32_t cnt)
 set repeat cnt
uint8_t multi_button_get_repeat_cnt (multi_button_handle_t *handle, uint32_t *cnt)
 get repeat cnt
uint8_t multi_button_set_period (multi_button_handle_t *handle, uint32_t period)
 set period
uint8_t multi_button_get_period (multi_button_handle_t *handle, uint32_t *period)
 get period

Detailed Description

driver multi_button header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2023-11-30

history

Date Version Author Description
2023/11/30 1.0 Shifeng Li first upload

Definition in file driver_multi_button.h.