53 lines
1.1 KiB
C
53 lines
1.1 KiB
C
/*
|
|
* port.h
|
|
*
|
|
* Created on: Jan 16, 2023
|
|
* Author: Partha
|
|
*/
|
|
|
|
#ifndef MAIN_PORT_H_
|
|
#define MAIN_PORT_H_
|
|
|
|
#include <stdint.h>
|
|
#include "sdkconfig.h"
|
|
#include "stdbool.h"
|
|
|
|
#define ALER1_IN_PIN 4
|
|
#define ALER2_IN_PIN 6
|
|
#define ALER3_IN_PIN 7
|
|
#define ALER4_IN_PIN 37
|
|
|
|
#define SWITCH_INPUT_PIN 5
|
|
|
|
#define ACCEL_INT1_PIN 9
|
|
#define VUSB_DETECT_PIN 10
|
|
|
|
void port_init(void);
|
|
|
|
uint8_t *port_get_isr(void);
|
|
|
|
void port_red_led_on(void);
|
|
void port_red_led_off(void);
|
|
void port_red_led_toggle(void);
|
|
bool port_red_led_is_on(void);
|
|
|
|
void port_blue_led_on(void);
|
|
void port_blue_led_off(void);
|
|
void port_blue_led_toggle(void);
|
|
bool port_blue_led_is_on(void);
|
|
|
|
void port_modem_assert_pwrkey(void);
|
|
void port_modem_deassert_pwrkey(void);
|
|
int port_is_usb_connected(void);
|
|
int port_modem_is_on(void);
|
|
int port_is_charging(void);
|
|
int port_is_pushbuttonNotPressed(void);
|
|
void port_vbatt_sense_enable(int en);
|
|
void port_accel_pwr_enable(int en);
|
|
void port_light_sensor_enable(int en);
|
|
void port_modem_ldo_pin(uint8_t en);
|
|
int port_usb_charge_status(void);
|
|
|
|
|
|
#endif /* MAIN_PORT_H_ */
|