Fix errors and deny errors

This commit is contained in:
Jeremy Soller 2019-11-10 18:49:21 -07:00
parent eb1a6a48bc
commit 8f69ece191
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
6 changed files with 15 additions and 7 deletions

View File

@ -1,4 +1,4 @@
CC=sdcc -mmcs51
CC=sdcc -mmcs51 --Werror
OBJ=$(patsubst src/%.c,$(BUILD)/%.rel,$(SRC))
# Run EC rom in simulator

View File

@ -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) {

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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);
}

View File

@ -4,7 +4,7 @@
void i2c_write(unsigned char value) {
// Write value to 0x76
TRASLAA = 0x76 << 1;
TRASLAA = 0xEC; // 0x76 << 1
HOCMDA = value;
for (;;) {