Disable debugging by default, enable wireless
This commit is contained in:
parent
08717157db
commit
56ae9f788c
@ -80,7 +80,7 @@ void gpio_init() {
|
|||||||
GPCRH2 = 0x44;
|
GPCRH2 = 0x44;
|
||||||
GPCRH3 = 0x44;
|
GPCRH3 = 0x44;
|
||||||
GPCRH4 = 0x80;
|
GPCRH4 = 0x80;
|
||||||
GPCRH5 = 0x80;
|
GPCRH5 = 0x44;
|
||||||
GPCRH6 = 0x80;
|
GPCRH6 = 0x80;
|
||||||
GPCRH7 = 0x80;
|
GPCRH7 = 0x80;
|
||||||
GPCRI0 = 0x00;
|
GPCRI0 = 0x00;
|
||||||
@ -108,6 +108,7 @@ void gpio_init() {
|
|||||||
GPCRM6 = 0x00;
|
GPCRM6 = 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GPIO_DEBUG
|
||||||
void gpio_debug_bank(
|
void gpio_debug_bank(
|
||||||
char * bank,
|
char * bank,
|
||||||
uint8_t data,
|
uint8_t data,
|
||||||
@ -142,3 +143,4 @@ void gpio_debug(void) {
|
|||||||
bank(J);
|
bank(J);
|
||||||
#undef bank
|
#undef bank
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -422,13 +422,17 @@ void main(void) {
|
|||||||
static struct Gpio __code SCI_N = GPIO(D, 4);
|
static struct Gpio __code SCI_N = GPIO(D, 4);
|
||||||
static struct Gpio __code SWI_N = GPIO(E, 0);
|
static struct Gpio __code SWI_N = GPIO(E, 0);
|
||||||
static struct Gpio __code SB_KBCRST_N = GPIO(E, 6);
|
static struct Gpio __code SB_KBCRST_N = GPIO(E, 6);
|
||||||
|
static struct Gpio __code BT_EN = GPIO(F, 3);
|
||||||
static struct Gpio __code PM_CLKRUN_N = GPIO(H, 0);
|
static struct Gpio __code PM_CLKRUN_N = GPIO(H, 0);
|
||||||
static struct Gpio __code BKL_EN = GPIO(H, 2);
|
static struct Gpio __code BKL_EN = GPIO(H, 2);
|
||||||
|
static struct Gpio __code WLAN_EN = GPIO(H, 5);
|
||||||
|
|
||||||
// Set the battery full LED (to know our firmware is loading)
|
// Set the battery full LED (to know our firmware is loading)
|
||||||
gpio_set(&LED_BAT_CHG, true);
|
gpio_set(&LED_BAT_CHG, true);
|
||||||
|
|
||||||
|
#if GPIO_DEBUG
|
||||||
gpio_debug();
|
gpio_debug();
|
||||||
|
#endif
|
||||||
|
|
||||||
//battery_debug();
|
//battery_debug();
|
||||||
|
|
||||||
@ -436,6 +440,9 @@ void main(void) {
|
|||||||
gpio_set(&SB_KBCRST_N, true);
|
gpio_set(&SB_KBCRST_N, true);
|
||||||
// Allow backlight to be turned on
|
// Allow backlight to be turned on
|
||||||
gpio_set(&BKL_EN, true);
|
gpio_set(&BKL_EN, true);
|
||||||
|
// Enable wireless
|
||||||
|
gpio_set(&BT_EN, true);
|
||||||
|
gpio_set(&WLAN_EN, true);
|
||||||
// Assert SMI#, SCI#, and SWI#
|
// Assert SMI#, SCI#, and SWI#
|
||||||
gpio_set(&SCI_N, true);
|
gpio_set(&SCI_N, true);
|
||||||
gpio_set(&SMI_N, true);
|
gpio_set(&SMI_N, true);
|
||||||
|
@ -2,8 +2,13 @@
|
|||||||
|
|
||||||
#include <common/i2c.h>
|
#include <common/i2c.h>
|
||||||
|
|
||||||
|
#define I2C_DEBUGGER 0
|
||||||
|
// #define I2C_DEBUGGER 0x76
|
||||||
|
|
||||||
int putchar(int c) {
|
int putchar(int c) {
|
||||||
unsigned char byte = (unsigned char)c;
|
unsigned char byte = (unsigned char)c;
|
||||||
i2c_send(0x76, &byte, 1);
|
#if I2C_DEBUGGER
|
||||||
|
i2c_send(I2C_DEBUGGER, &byte, 1);
|
||||||
|
#endif
|
||||||
return (int)byte;
|
return (int)byte;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user