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

driver multi_button source file More...

Include dependency graph for driver_multi_button.c:

Go to the source code of this file.

Macros

#define CHIP_NAME   "General MULTI_BUTTON"
 chip information definition
#define MANUFACTURER_NAME   "General"
#define SUPPLY_VOLTAGE_MIN   1.8f
#define SUPPLY_VOLTAGE_MAX   5.5f
#define MAX_CURRENT   1.0f
#define TEMPERATURE_MIN   -40.0f
#define TEMPERATURE_MAX   125.0f
#define DRIVER_VERSION   1000
#define MULTI_BUTTON_SHORT_TIME   (1000 * 1000)
 multi_button check definition
#define MULTI_BUTTON_LONG_TIME   (3 * 1000 * 1000)
#define MULTI_BUTTON_REPEAT_TIME   (200 * 1000)
#define MULTI_BUTTON_INTERVAL   (5 * 1000)
#define MULTI_BUTTON_TIMEOUT   (1000 * 1000)
#define MULTI_BUTTON_REPEAT_CNT   (2)
#define MULTI_BUTTON_PERIOD   (200 * 1000)

Functions

uint8_t multi_button_process (multi_button_handle_t *handle)
 process
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_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
uint8_t multi_button_info (multi_button_info_t *info)
 get chip's information

Detailed Description

driver multi_button source 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.c.

Macro Definition Documentation

◆ CHIP_NAME

#define CHIP_NAME   "General MULTI_BUTTON"

chip information definition

chip name

Definition at line 42 of file driver_multi_button.c.

◆ DRIVER_VERSION

#define DRIVER_VERSION   1000

driver version

Definition at line 49 of file driver_multi_button.c.

◆ MANUFACTURER_NAME

#define MANUFACTURER_NAME   "General"

manufacturer name

Definition at line 43 of file driver_multi_button.c.

◆ MAX_CURRENT

#define MAX_CURRENT   1.0f

chip max current

Definition at line 46 of file driver_multi_button.c.

◆ MULTI_BUTTON_INTERVAL

#define MULTI_BUTTON_INTERVAL   (5 * 1000)

5ms

Definition at line 57 of file driver_multi_button.c.

◆ MULTI_BUTTON_LONG_TIME

#define MULTI_BUTTON_LONG_TIME   (3 * 1000 * 1000)

3s

Definition at line 55 of file driver_multi_button.c.

◆ MULTI_BUTTON_PERIOD

#define MULTI_BUTTON_PERIOD   (200 * 1000)

200ms

Definition at line 60 of file driver_multi_button.c.

◆ MULTI_BUTTON_REPEAT_CNT

#define MULTI_BUTTON_REPEAT_CNT   (2)

2

Definition at line 59 of file driver_multi_button.c.

◆ MULTI_BUTTON_REPEAT_TIME

#define MULTI_BUTTON_REPEAT_TIME   (200 * 1000)

200ms

Definition at line 56 of file driver_multi_button.c.

◆ MULTI_BUTTON_SHORT_TIME

#define MULTI_BUTTON_SHORT_TIME   (1000 * 1000)

multi_button check definition

1s

Definition at line 54 of file driver_multi_button.c.

◆ MULTI_BUTTON_TIMEOUT

#define MULTI_BUTTON_TIMEOUT   (1000 * 1000)

1s

Definition at line 58 of file driver_multi_button.c.

◆ SUPPLY_VOLTAGE_MAX

#define SUPPLY_VOLTAGE_MAX   5.5f

chip max supply voltage

Definition at line 45 of file driver_multi_button.c.

◆ SUPPLY_VOLTAGE_MIN

#define SUPPLY_VOLTAGE_MIN   1.8f

chip min supply voltage

Definition at line 44 of file driver_multi_button.c.

◆ TEMPERATURE_MAX

#define TEMPERATURE_MAX   125.0f

chip max operating temperature

Definition at line 48 of file driver_multi_button.c.

◆ TEMPERATURE_MIN

#define TEMPERATURE_MIN   -40.0f

chip min operating temperature

Definition at line 47 of file driver_multi_button.c.