From: Thomas Pietrzak Date: Mon, 24 Sep 2018 11:39:56 +0000 (+0200) Subject: update to latest changes X-Git-Url: https://git.thomaspietrzak.com/?a=commitdiff_plain;p=gyro-stm32f429.git update to latest changes --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5dca0c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.DS_Store + +*.o +*.bin +*.elf +*.map +*.zip +*.dep + diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c631cc2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "uC-sdk"] + path = uC-sdk + url = git@github.com:grumpycoders/uC-sdk.git diff --git a/lcdexample.c b/lcdexample.c index 09187f0..4829668 100644 --- a/lcdexample.c +++ b/lcdexample.c @@ -43,8 +43,8 @@ float rx = 0, ry = 0; void initLed() { - led[0] = make_pin(GPIO_PORT_G, 13); - led[1] = make_pin(GPIO_PORT_G, 14); + led[0] = make_pin(gpio_port_g, 13); + led[1] = make_pin(gpio_port_g, 14); gpio_config(led[0], pin_dir_write, pull_down); gpio_config(led[1], pin_dir_write, pull_down); } @@ -65,11 +65,11 @@ void initLCD() void initGyro() { - pin_t sclk = make_pin(GPIO_PORT_F, 7); - pin_t mosi = make_pin(GPIO_PORT_F, 9); - pin_t miso = make_pin(GPIO_PORT_F, 8); - pin_t cs = make_pin(GPIO_PORT_C, 1); - ssp_port_t gyroport = { .ssp = ssp_port_5, .sclk = sclk, .mosi = mosi, .miso = miso }; + pin_t sclk = make_pin(gpio_port_f, 7); + pin_t mosi = make_pin(gpio_port_f, 9); + pin_t miso = make_pin(gpio_port_f, 8); + pin_t cs = make_pin(gpio_port_c, 1); + ssp_port_t gyroport = { .ssp = ssp_5, .sclk = sclk, .mosi = mosi, .miso = miso }; if (!l3gd20_init_ssp(&gyro, gyroport, cs)) printf("Cannot initialize gyroscope"); @@ -184,7 +184,6 @@ void drawGradient() void drawing() { drawRainbow(); - LCD_SetTextColor(ASSEMBLE_RGB(0x00, 0x00, 0x00)); LCD_DrawFullRect(00, 10, 240, 64); @@ -221,7 +220,7 @@ void drawTask() } } -int main() +int main() { init_malloc_wrapper(); diff --git a/uC-sdk b/uC-sdk new file mode 160000 index 0000000..c36c466 --- /dev/null +++ b/uC-sdk @@ -0,0 +1 @@ +Subproject commit c36c46633589907a2749bc93beb787a3a2ec987c