Fix errors and deny errors
This commit is contained in:
parent
eb1a6a48bc
commit
8f69ece191
@ -1,4 +1,4 @@
|
||||
CC=sdcc -mmcs51
|
||||
CC=sdcc -mmcs51 --Werror
|
||||
OBJ=$(patsubst src/%.c,$(BUILD)/%.rel,$(SRC))
|
||||
|
||||
# Run EC rom in simulator
|
||||
|
@ -69,6 +69,8 @@ uint8_t battery_charger_disable(void) {
|
||||
// Disable charge voltage
|
||||
err = smbus_write(0x09, 0x15, 0);
|
||||
if (err) return err;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t battery_charger_enable(void) {
|
||||
|
@ -12,7 +12,7 @@ void gpio_init() {
|
||||
GPDRC = 0;
|
||||
GPDRD = (1 << 5) | (1 << 4) | (1 << 3);
|
||||
GPDRE = 0;
|
||||
GPDRF = (1 << 7) | (1 << 6);
|
||||
GPDRF = 0xC0; // (1 << 7) | (1 << 6)
|
||||
GPDRG = 0;
|
||||
GPDRH = 0;
|
||||
GPDRI = 0;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <board/keymap.h>
|
||||
|
||||
uint16_t __code KEYMAP[KM_OUT][KM_IN][KM_LAY] = {
|
||||
@ -276,5 +278,9 @@ uint16_t keymap_translate(uint16_t key) {
|
||||
case K_LEFT: return (K_E0 | 0x4B);
|
||||
case K_DOWN: return (K_E0 | 0x50);
|
||||
case K_RIGHT: return (K_E0 | 0x4D);
|
||||
|
||||
default:
|
||||
printf("keymap_translate: unknown %02X\n", key);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -272,9 +272,9 @@ void power_button() {
|
||||
last = new;
|
||||
}
|
||||
|
||||
void touchpad_event(struct Ps2 * ps2) {
|
||||
//TODO
|
||||
}
|
||||
// void touchpad_event(struct Ps2 * ps2) {
|
||||
// //TODO
|
||||
// }
|
||||
|
||||
struct Gpio __code LED_SSD_N = GPIO(G, 6);
|
||||
struct Gpio __code LED_AIRPLANE_N = GPIO(G, 6);
|
||||
@ -317,7 +317,7 @@ void main(void) {
|
||||
ac_adapter();
|
||||
power_button();
|
||||
kbscan_event();
|
||||
touchpad_event(&PS2_3);
|
||||
//TODO: touchpad_event(&PS2_3);
|
||||
kbc_event(&KBC);
|
||||
pmc_event(&PMC_1);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
void i2c_write(unsigned char value) {
|
||||
// Write value to 0x76
|
||||
TRASLAA = 0x76 << 1;
|
||||
TRASLAA = 0xEC; // 0x76 << 1
|
||||
HOCMDA = value;
|
||||
|
||||
for (;;) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user