KT24-1110_65E-HA-651B/include_lib/system/device/slidekey.h
2024-11-10 18:44:17 +08:00

32 lines
517 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef DEVICE_SLIDEKEY_H
#define DEVICE_SLIDEKEY_H
#include "typedef.h"
#include "device/device.h"
#include "asm/adc_api.h"
struct slidekey_port {
u8 io;
u8 io_up_en; //是否用外部上拉1用外部上拉 0用内部上拉10K
u32 level;
u32 ad_channel;
int msg;
};
struct slidekey_platform_data {
u8 enable;
u8 num;
const struct slidekey_port *port;
};
//API:
extern int slidekey_init(const struct slidekey_platform_data *slidekey_data);
#endif