Move Gpio definitions to gpio.c
This commit is contained in:
parent
6d7f2807d5
commit
26d01841d1
@ -1,6 +1,22 @@
|
|||||||
#include <board/gpio.h>
|
#include <board/gpio.h>
|
||||||
#include <common/debug.h>
|
#include <common/debug.h>
|
||||||
|
|
||||||
|
struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
|
||||||
|
struct Gpio __code ACIN_N = GPIO(B, 0);
|
||||||
|
struct Gpio __code LID_SW_N = GPIO(B, 1);
|
||||||
|
struct Gpio __code SWI_N = GPIO(B, 5);
|
||||||
|
struct Gpio __code LED_ACIN = GPIO(C, 7);
|
||||||
|
struct Gpio __code CCD_EN = GPIO(D, 1);
|
||||||
|
struct Gpio __code SCI_N = GPIO(D, 3);
|
||||||
|
struct Gpio __code SMI_N = GPIO(D, 4);
|
||||||
|
struct Gpio __code USB_PWR_EN_N = GPIO(E, 3);
|
||||||
|
struct Gpio __code SB_KBCRST_N = GPIO(E, 6);
|
||||||
|
struct Gpio __code BT_EN = GPIO(F, 3);
|
||||||
|
struct Gpio __code WLAN_EN = GPIO(G, 1);
|
||||||
|
struct Gpio __code PM_CLKRUN_N = GPIO(H, 0);
|
||||||
|
struct Gpio __code BKL_EN = GPIO(H, 2);
|
||||||
|
|
||||||
|
//TODO: Set these settings correctly
|
||||||
void gpio_init() {
|
void gpio_init() {
|
||||||
// Enable LPC reset on GPD2
|
// Enable LPC reset on GPD2
|
||||||
GCR = 0x04;
|
GCR = 0x04;
|
||||||
|
@ -59,8 +59,8 @@ void init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ac_adapter() {
|
void ac_adapter() {
|
||||||
static struct Gpio __code ACIN_N = GPIO(B, 0);
|
extern struct Gpio __code ACIN_N;
|
||||||
static struct Gpio __code LED_ACIN = GPIO(C, 7);
|
extern struct Gpio __code LED_ACIN;
|
||||||
|
|
||||||
static bool send_sci = true;
|
static bool send_sci = true;
|
||||||
static bool last = true;
|
static bool last = true;
|
||||||
@ -116,7 +116,7 @@ void touchpad_event(struct Ps2 * ps2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void lid_event(void) {
|
void lid_event(void) {
|
||||||
static struct Gpio __code LID_SW_N = GPIO(B, 1);
|
extern struct Gpio __code LID_SW_N;
|
||||||
|
|
||||||
static bool send_sci = true;
|
static bool send_sci = true;
|
||||||
static bool last = true;
|
static bool last = true;
|
||||||
@ -153,17 +153,16 @@ void main(void) {
|
|||||||
|
|
||||||
INFO("\n");
|
INFO("\n");
|
||||||
|
|
||||||
static struct Gpio __code SMI_N = GPIO(D, 4);
|
extern struct Gpio __code SMI_N;
|
||||||
static struct Gpio __code SCI_N = GPIO(D, 3);
|
extern struct Gpio __code SCI_N;
|
||||||
static struct Gpio __code SWI_N = GPIO(B, 5);
|
extern struct Gpio __code SWI_N;
|
||||||
static struct Gpio __code SB_KBCRST_N = GPIO(E, 6);
|
extern struct Gpio __code SB_KBCRST_N;
|
||||||
static struct Gpio __code BT_EN = GPIO(F, 3);
|
extern struct Gpio __code BT_EN;
|
||||||
static struct Gpio __code USB_PWR_EN_N = GPIO(E, 3);
|
extern struct Gpio __code USB_PWR_EN_N;
|
||||||
static struct Gpio __code CCD_EN = GPIO(D, 1);
|
extern struct Gpio __code CCD_EN;
|
||||||
static struct Gpio __code PM_CLKRUN_N = GPIO(H, 0);
|
extern struct Gpio __code BKL_EN;
|
||||||
static struct Gpio __code BKL_EN = GPIO(H, 2);
|
extern struct Gpio __code WLAN_EN;
|
||||||
static struct Gpio __code WLAN_EN = GPIO(G, 1);
|
extern struct Gpio __code WLAN_PWR_EN;
|
||||||
static struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
|
|
||||||
|
|
||||||
#if GPIO_DEBUG
|
#if GPIO_DEBUG
|
||||||
gpio_debug();
|
gpio_debug();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user