From 2a6794d57cdc7b530b556979ef9a3838773d3c89 Mon Sep 17 00:00:00 2001 From: Penguin Date: Thu, 21 May 2020 23:34:44 -0500 Subject: [PATCH] preparing a fix --- .../.vs/project_oracle_test_prj/v14/.atsuo | Bin 49664 -> 31232 bytes .../project_oracle_test_prj/atmel_start.c | 9 -- .../project_oracle_test_prj/atmel_start.h | 18 --- .../atmel_start_pins.h | 12 -- .../devices/{test.h => display/p_ssd1963.c} | 0 .../devices/display/p_ssd1963.h | 0 .../project_oracle_test_prj/driver_init.c | 134 ------------------ .../project_oracle_test_prj/driver_init.h | 54 ------- .../project_oracle_test_prj/drivers/p_gpio.c | 8 ++ .../project_oracle_test_prj/drivers/p_i2c.c | 13 ++ .../project_oracle_test_prj/drivers/p_tcc.c | 28 ++++ .../project_oracle_test_prj/drivers/p_usart.c | 33 ++++- .../examples/driver_examples.c | 84 ----------- .../examples/driver_examples.h | 26 ---- .../project_oracle_test_prj/oracle.c | 10 ++ .../project_oracle_test_prj.cproj | 42 ++---- 16 files changed, 106 insertions(+), 365 deletions(-) delete mode 100644 software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start.c delete mode 100644 software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start.h delete mode 100644 software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start_pins.h rename software/firmware/project_oracle_test_prj/project_oracle_test_prj/devices/{test.h => display/p_ssd1963.c} (100%) create mode 100644 software/firmware/project_oracle_test_prj/project_oracle_test_prj/devices/display/p_ssd1963.h delete mode 100644 software/firmware/project_oracle_test_prj/project_oracle_test_prj/driver_init.c delete mode 100644 software/firmware/project_oracle_test_prj/project_oracle_test_prj/driver_init.h delete mode 100644 software/firmware/project_oracle_test_prj/project_oracle_test_prj/examples/driver_examples.c delete mode 100644 software/firmware/project_oracle_test_prj/project_oracle_test_prj/examples/driver_examples.h diff --git a/software/firmware/project_oracle_test_prj/.vs/project_oracle_test_prj/v14/.atsuo b/software/firmware/project_oracle_test_prj/.v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V-gx~N^|{Zy{*{*%&R+G@o1dbB%UZ1LFSpi}&Mo?DmQnIO!QFjQ QVuB4pN4@@!`bUxfA3nl9vH$=8 diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start.c b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start.c deleted file mode 100644 index 9d0900d..0000000 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -/** - * Initializes MCU, drivers and middleware in the project - **/ -void atmel_start_init(void) -{ - system_init(); -} diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start.h deleted file mode 100644 index a035c6c..0000000 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ATMEL_START_H_INCLUDED -#define ATMEL_START_H_INCLUDED - -#ifdef __cplusplus -extern "C" { -#endif - -#include "driver_init.h" - -/** - * Initializes MCU, drivers and middleware in the project - **/ -void atmel_start_init(void); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start_pins.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start_pins.h deleted file mode 100644 index 1344f6c..0000000 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/atmel_start_pins.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Code generated from Atmel Start. - * - * This file will be overwritten when reconfiguring your Atmel Start project. - * Please copy examples or other code you want to keep to a separate file - * to avoid losing it when reconfiguring. - */ -#ifndef ATMEL_START_PINS_H_INCLUDED -#define ATMEL_START_PINS_H_INCLUDED - - -#endif // ATMEL_START_PINS_H_INCLUDED diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/devices/test.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/devices/display/p_ssd1963.c similarity index 100% rename from software/firmware/project_oracle_test_prj/project_oracle_test_prj/devices/test.h rename to software/firmware/project_oracle_test_prj/project_oracle_test_prj/devices/display/p_ssd1963.c diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/devices/display/p_ssd1963.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/devices/display/p_ssd1963.h new file mode 100644 index 0000000..e69de29 diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/driver_init.c b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/driver_init.c deleted file mode 100644 index 2ee900b..0000000 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/driver_init.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Code generated from Atmel Start. - * - * This file will be overwritten when reconfiguring your Atmel Start project. - * Please copy examples or other code you want to keep to a separate file - * to avoid losing it when reconfiguring. - */ - -#include "driver_init.h" -#include -#include -#include - -/*! The buffer size for USART */ -#define USART_0_BUFFER_SIZE 16 - -struct usart_async_descriptor USART_0; -struct timer_descriptor TIMER_0; - -static uint8_t USART_0_buffer[USART_0_BUFFER_SIZE]; - -struct i2c_m_sync_desc I2C_0; - -void EXTERNAL_IRQ_0_init(void) -{ - hri_gclk_write_PCHCTRL_reg(GCLK, EIC_GCLK_ID, CONF_GCLK_EIC_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); - hri_mclk_set_APBAMASK_EIC_bit(MCLK); - - ext_irq_init(); -} - -/** - * \brief USART Clock initialization function - * - * Enables register interface and peripheral clock - */ -void USART_0_CLOCK_init() -{ - - hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM2_GCLK_ID_CORE, CONF_GCLK_SERCOM2_CORE_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); - hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM2_GCLK_ID_SLOW, CONF_GCLK_SERCOM2_SLOW_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); - - hri_mclk_set_APBBMASK_SERCOM2_bit(MCLK); -} - -/** - * \brief USART pinmux initialization function - * - * Set each required pin to USART functionality - */ -void USART_0_PORT_init() -{ - - gpio_set_pin_function(PB25, PINMUX_PB25D_SERCOM2_PAD0); - - gpio_set_pin_function(PB24, PINMUX_PB24D_SERCOM2_PAD1); -} - -/** - * \brief USART initialization function - * - * Enables USART peripheral, clocks and initializes USART driver - */ -void USART_0_init(void) -{ - USART_0_CLOCK_init(); - usart_async_init(&USART_0, SERCOM2, USART_0_buffer, USART_0_BUFFER_SIZE, (void *)NULL); - USART_0_PORT_init(); -} - -void I2C_0_PORT_init(void) -{ - - gpio_set_pin_pull_mode(PA22, - // Pull configuration - // pad_pull_config - // Off - // Pull-up - // Pull-down - GPIO_PULL_OFF); - - gpio_set_pin_function(PA22, PINMUX_PA22C_SERCOM3_PAD0); - - gpio_set_pin_pull_mode(PA23, - // Pull configuration - // pad_pull_config - // Off - // Pull-up - // Pull-down - GPIO_PULL_OFF); - - gpio_set_pin_function(PA23, PINMUX_PA23C_SERCOM3_PAD1); -} - -void I2C_0_CLOCK_init(void) -{ - hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM3_GCLK_ID_CORE, CONF_GCLK_SERCOM3_CORE_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); - hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM3_GCLK_ID_SLOW, CONF_GCLK_SERCOM3_SLOW_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); - - hri_mclk_set_APBBMASK_SERCOM3_bit(MCLK); -} - -void I2C_0_init(void) -{ - I2C_0_CLOCK_init(); - i2c_m_sync_init(&I2C_0, SERCOM3); - I2C_0_PORT_init(); -} - -/** - * \brief Timer initialization function - * - * Enables Timer peripheral, clocks and initializes Timer driver - */ -static void TIMER_0_init(void) -{ - hri_mclk_set_APBAMASK_TC0_bit(MCLK); - hri_gclk_write_PCHCTRL_reg(GCLK, TC0_GCLK_ID, CONF_GCLK_TC0_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); - - timer_init(&TIMER_0, TC0, _tc_get_timer()); -} - -void system_init(void) -{ - init_mcu(); - - EXTERNAL_IRQ_0_init(); - - USART_0_init(); - - I2C_0_init(); - - TIMER_0_init(); -} diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/driver_init.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/driver_init.h deleted file mode 100644 index b82abbb..0000000 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/driver_init.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Code generated from Atmel Start. - * - * This file will be overwritten when reconfiguring your Atmel Start project. - * Please copy examples or other code you want to keep to a separate file - * to avoid losing it when reconfiguring. - */ -#ifndef DRIVER_INIT_INCLUDED -#define DRIVER_INIT_INCLUDED - -#include "atmel_start_pins.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include - -extern struct usart_async_descriptor USART_0; - -extern struct i2c_m_sync_desc I2C_0; -extern struct timer_descriptor TIMER_0; - -void USART_0_PORT_init(void); -void USART_0_CLOCK_init(void); -void USART_0_init(void); - -void I2C_0_CLOCK_init(void); -void I2C_0_init(void); -void I2C_0_PORT_init(void); - -/** - * \brief Perform system initialization, initialize pins and clocks for - * peripherals - */ -void system_init(void); - -#ifdef __cplusplus -} -#endif -#endif // DRIVER_INIT_INCLUDED diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_gpio.c b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_gpio.c index e69de29..5ebb120 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_gpio.c +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_gpio.c @@ -0,0 +1,8 @@ + + +/** + * Example of using EXTERNAL_IRQ_0 + */ +void EXTERNAL_IRQ_0_example(void) +{ +} diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_i2c.c b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_i2c.c index e69de29..73f5d52 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_i2c.c +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_i2c.c @@ -0,0 +1,13 @@ + + + +void I2C_0_example(void) +{ + struct io_descriptor *I2C_0_io; + + i2c_m_sync_get_io_descriptor(&I2C_0, &I2C_0_io); + i2c_m_sync_enable(&I2C_0); + i2c_m_sync_set_slaveaddr(&I2C_0, 0x12, I2C_M_SEVEN); + io_write(I2C_0_io, (uint8_t *)"Hello World!", 12); +} + diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_tcc.c b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_tcc.c index e69de29..047479c 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_tcc.c +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_tcc.c @@ -0,0 +1,28 @@ + + +static struct timer_task TIMER_0_task1, TIMER_0_task2; + +/** + * Example of using TIMER_0. + */ +static void TIMER_0_task1_cb(const struct timer_task *const timer_task) +{ +} + +static void TIMER_0_task2_cb(const struct timer_task *const timer_task) +{ +} + +void TIMER_0_example(void) +{ + TIMER_0_task1.interval = 100; + TIMER_0_task1.cb = TIMER_0_task1_cb; + TIMER_0_task1.mode = TIMER_TASK_REPEAT; + TIMER_0_task2.interval = 200; + TIMER_0_task2.cb = TIMER_0_task2_cb; + TIMER_0_task2.mode = TIMER_TASK_REPEAT; + + timer_add_task(&TIMER_0, &TIMER_0_task1); + timer_add_task(&TIMER_0, &TIMER_0_task2); + timer_start(&TIMER_0); +} diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_usart.c b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_usart.c index 4c9bcd8..bacb09d 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_usart.c +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_usart.c @@ -1,6 +1,9 @@ #include "p_usart.h" static usart_async_descriptor debug_inst; + +static uint8_t example_USART_0[12] = "Hello World!"; + static uint8_t debug_buffer[DEBUG_MAX_BUFFER_SIZE] void p_usart_init(void) { @@ -15,4 +18,32 @@ void p_write(struct usart_async_descriptor* const inst, const uint8_t* data, uin void p_debug(const char* str, ...) { -} \ No newline at end of file +} + + + +/** + * Example of using USART_0 to write "Hello World" using the IO abstraction. + * + * Since the driver is asynchronous we need to use statically allocated memory for string + * because driver initiates transfer and then returns before the transmission is completed. + * + * Once transfer has been completed the tx_cb function will be called. + */ +static void tx_cb_USART_0(const struct usart_async_descriptor *const io_descr) +{ + /* Transfer completed */ +} + +void USART_0_example(void) +{ + struct io_descriptor *io; + + usart_async_register_callback(&USART_0, USART_ASYNC_TXC_CB, tx_cb_USART_0); + /*usart_async_register_callback(&USART_0, USART_ASYNC_RXC_CB, rx_cb); + usart_async_register_callback(&USART_0, USART_ASYNC_ERROR_CB, err_cb);*/ + usart_async_get_io_descriptor(&USART_0, &io); + usart_async_enable(&USART_0); + + io_write(io, example_USART_0, 12); +} diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/examples/driver_examples.c b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/examples/driver_examples.c deleted file mode 100644 index 4218cbe..0000000 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/examples/driver_examples.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Code generated from Atmel Start. - * - * This file will be overwritten when reconfiguring your Atmel Start project. - * Please copy examples or other code you want to keep to a separate file - * to avoid losing it when reconfiguring. - */ - -#include "driver_examples.h" -#include "driver_init.h" -#include "utils.h" - -/** - * Example of using EXTERNAL_IRQ_0 - */ -void EXTERNAL_IRQ_0_example(void) -{ -} - -/** - * Example of using USART_0 to write "Hello World" using the IO abstraction. - * - * Since the driver is asynchronous we need to use statically allocated memory for string - * because driver initiates transfer and then returns before the transmission is completed. - * - * Once transfer has been completed the tx_cb function will be called. - */ - -static uint8_t example_USART_0[12] = "Hello World!"; - -static void tx_cb_USART_0(const struct usart_async_descriptor *const io_descr) -{ - /* Transfer completed */ -} - -void USART_0_example(void) -{ - struct io_descriptor *io; - - usart_async_register_callback(&USART_0, USART_ASYNC_TXC_CB, tx_cb_USART_0); - /*usart_async_register_callback(&USART_0, USART_ASYNC_RXC_CB, rx_cb); - usart_async_register_callback(&USART_0, USART_ASYNC_ERROR_CB, err_cb);*/ - usart_async_get_io_descriptor(&USART_0, &io); - usart_async_enable(&USART_0); - - io_write(io, example_USART_0, 12); -} - -void I2C_0_example(void) -{ - struct io_descriptor *I2C_0_io; - - i2c_m_sync_get_io_descriptor(&I2C_0, &I2C_0_io); - i2c_m_sync_enable(&I2C_0); - i2c_m_sync_set_slaveaddr(&I2C_0, 0x12, I2C_M_SEVEN); - io_write(I2C_0_io, (uint8_t *)"Hello World!", 12); -} - -static struct timer_task TIMER_0_task1, TIMER_0_task2; - -/** - * Example of using TIMER_0. - */ -static void TIMER_0_task1_cb(const struct timer_task *const timer_task) -{ -} - -static void TIMER_0_task2_cb(const struct timer_task *const timer_task) -{ -} - -void TIMER_0_example(void) -{ - TIMER_0_task1.interval = 100; - TIMER_0_task1.cb = TIMER_0_task1_cb; - TIMER_0_task1.mode = TIMER_TASK_REPEAT; - TIMER_0_task2.interval = 200; - TIMER_0_task2.cb = TIMER_0_task2_cb; - TIMER_0_task2.mode = TIMER_TASK_REPEAT; - - timer_add_task(&TIMER_0, &TIMER_0_task1); - timer_add_task(&TIMER_0, &TIMER_0_task2); - timer_start(&TIMER_0); -} diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/examples/driver_examples.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/examples/driver_examples.h deleted file mode 100644 index bebd724..0000000 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/examples/driver_examples.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated from Atmel Start. - * - * This file will be overwritten when reconfiguring your Atmel Start project. - * Please copy examples or other code you want to keep to a separate file - * to avoid losing it when reconfiguring. - */ -#ifndef DRIVER_EXAMPLES_H_INCLUDED -#define DRIVER_EXAMPLES_H_INCLUDED - -#ifdef __cplusplus -extern "C" { -#endif - -void EXTERNAL_IRQ_0_example(void); - -void USART_0_example(void); - -void I2C_0_example(void); - -void TIMER_0_example(void); - -#ifdef __cplusplus -} -#endif -#endif // DRIVER_EXAMPLES_H_INCLUDED diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/oracle.c b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/oracle.c index 4310f82..8525bc9 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/oracle.c +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/oracle.c @@ -8,5 +8,15 @@ void oracle_init(void) { + // init mcu + // uart init + + // i2c init + + // gpio init + + // time init + + // devices init } \ No newline at end of file diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/project_oracle_test_prj.cproj b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/project_oracle_test_prj.cproj index af86218..0edd5df 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/project_oracle_test_prj.cproj +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/project_oracle_test_prj.cproj @@ -30,15 +30,15 @@ - - - - - - - - - + + + + + + + + + .atmelstart\atmel_start_config.atstart .atmelstart\AtmelStart.gpdsc @@ -418,15 +418,6 @@ - - compile - - - compile - - - compile - compile @@ -469,6 +460,12 @@ compile + + compile + + + compile + compile @@ -499,15 +496,6 @@ compile - - compile - - - compile - - - compile - compile