diff --git a/software/firmware/project_oracle_test_prj/.vs/project_oracle_test_prj/v14/.atsuo b/software/firmware/project_oracle_test_prj/.vs/project_oracle_test_prj/v14/.atsuo index 0adfae4..49c6e5f 100644 Binary files a/software/firmware/project_oracle_test_prj/.vs/project_oracle_test_prj/v14/.atsuo and b/software/firmware/project_oracle_test_prj/.vs/project_oracle_test_prj/v14/.atsuo differ diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/Config/pc_board.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/Config/pc_board.h new file mode 100644 index 0000000..3869c0e --- /dev/null +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/Config/pc_board.h @@ -0,0 +1,36 @@ +/* + * pc_board.h + * + * Created: 5/3/2020 6:47:40 PM + * Author: Penguin + */ +#ifndef _PC_BOARD_H_ +#define _PC_BOARD_H_ + +#include + +// SAME54 has 14 pin functions +#define GPIO_PIN_FUNCTION_A 0 +#define GPIO_PIN_FUNCTION_B 1 +#define GPIO_PIN_FUNCTION_C 2 +#define GPIO_PIN_FUNCTION_D 3 +#define GPIO_PIN_FUNCTION_E 4 +#define GPIO_PIN_FUNCTION_F 5 +#define GPIO_PIN_FUNCTION_G 6 +#define GPIO_PIN_FUNCTION_H 7 +#define GPIO_PIN_FUNCTION_I 8 +#define GPIO_PIN_FUNCTION_J 9 +#define GPIO_PIN_FUNCTION_K 10 +#define GPIO_PIN_FUNCTION_L 11 +#define GPIO_PIN_FUNCTION_M 12 +#define GPIO_PIN_FUNCTION_N 13 + +// I2C Config +#define I2C_MASTER_SDA (GPIO_PORTA, 22) +#define I2C_MASTER_SCL (GPIO_PORTA, 23) + +// Debug USART Config +#define USART_DEBUG_RX GPIO(GPIO_PORTB, 24) +#define USART_DEBUG_TX GPIO(GPIO_PORTB, 25) + +#endif \ No newline at end of file diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/Config/pc_master.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/Config/pc_master.h new file mode 100644 index 0000000..9ccc961 --- /dev/null +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/Config/pc_master.h @@ -0,0 +1,14 @@ +/* + * pc_master.h + * + * Created: 5/3/2020 6:47:27 PM + * Author: Penguin + */ +#ifndef _PC_MASTER_H_ +#define _PC_MASTER_H_ + +// usart debug settings +#define DEBUG_MAX_BUFFER_SIZE (128) + + +#endif \ No newline at end of file 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 index 44a1c39..48712d5 100644 --- 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 @@ -8,28 +8,5 @@ #ifndef ATMEL_START_PINS_H_INCLUDED #define ATMEL_START_PINS_H_INCLUDED -#include - -// SAME54 has 14 pin functions - -#define GPIO_PIN_FUNCTION_A 0 -#define GPIO_PIN_FUNCTION_B 1 -#define GPIO_PIN_FUNCTION_C 2 -#define GPIO_PIN_FUNCTION_D 3 -#define GPIO_PIN_FUNCTION_E 4 -#define GPIO_PIN_FUNCTION_F 5 -#define GPIO_PIN_FUNCTION_G 6 -#define GPIO_PIN_FUNCTION_H 7 -#define GPIO_PIN_FUNCTION_I 8 -#define GPIO_PIN_FUNCTION_J 9 -#define GPIO_PIN_FUNCTION_K 10 -#define GPIO_PIN_FUNCTION_L 11 -#define GPIO_PIN_FUNCTION_M 12 -#define GPIO_PIN_FUNCTION_N 13 - -#define PA22 GPIO(GPIO_PORTA, 22) -#define PA23 GPIO(GPIO_PORTA, 23) -#define PB24 GPIO(GPIO_PORTB, 24) -#define PB25 GPIO(GPIO_PORTB, 25) #endif // ATMEL_START_PINS_H_INCLUDED diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_gpio.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_gpio.h index e69de29..7997827 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_gpio.h +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_gpio.h @@ -0,0 +1,6 @@ +#ifndef _P_GPIO_H_ +#define _P_GPIO_H_ + +void p_gpio_init(void); + +#endif \ No newline at end of file diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_i2c.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_i2c.h index e69de29..5d60dcd 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_i2c.h +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_i2c.h @@ -0,0 +1,7 @@ +#ifndef _P_I2C_H_ +#define _P_I2C_H_ + +void p_i2c_init(void); + + +#endif \ No newline at end of file diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_tcc.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_tcc.h index e69de29..49a7bc2 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_tcc.h +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_tcc.h @@ -0,0 +1,6 @@ +#ifndef _P_TCC_H_ +#define _P_TCC_H_ + + + +#endif \ No newline at end of file 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 e69de29..4c9bcd8 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 @@ -0,0 +1,18 @@ +#include "p_usart.h" + +static usart_async_descriptor debug_inst; +static uint8_t debug_buffer[DEBUG_MAX_BUFFER_SIZE] +void p_usart_init(void) +{ + +} + +void p_write(struct usart_async_descriptor* const inst, const uint8_t* data, uint16_t len) +{ + +} + +void p_debug(const char* str, ...) +{ + +} \ No newline at end of file diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_usart.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_usart.h index e69de29..16c73d1 100644 --- a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_usart.h +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/drivers/p_usart.h @@ -0,0 +1,11 @@ +#ifndef _P_USART_H_ +#define _P_USART_H_ + + +void p_usart_init(void); + +void p_write(struct usart_async_descriptor* const inst, const uint8_t* data, uint16_t len); + +void p_debug(const char* str, ...); + +#endif \ No newline at end of file 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 new file mode 100644 index 0000000..4310f82 --- /dev/null +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/oracle.c @@ -0,0 +1,12 @@ +/* + * oracle.c + * + * Created: 5/3/2020 7:24:09 PM + * Author: Penguin + */ +#include "oracle.h" + +void oracle_init(void) +{ + +} \ No newline at end of file diff --git a/software/firmware/project_oracle_test_prj/project_oracle_test_prj/oracle.h b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/oracle.h new file mode 100644 index 0000000..ffd0d0d --- /dev/null +++ b/software/firmware/project_oracle_test_prj/project_oracle_test_prj/oracle.h @@ -0,0 +1,27 @@ +/* + * oracle.h + * + * Created: 5/3/2020 7:05:17 PM + * Author: Penguin + */ +#ifndef _ORACLE_H_ +#define _ORACLE_H_ + +typedef enum p_err +{ + PE_GOOD = 0x0, // + PE_BAD = 0x1 // +}p_err; + +typedef enum p_log_level +{ + +}p_log_level; +void oracle_init(void); + +int p_qprint(const char* str, ...); + +int p_lprint(const char* str, ...); + + +#endif \ 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 8008062..af86218 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 @@ -457,6 +457,12 @@ compile + + compile + + + compile + compile @@ -469,6 +475,30 @@ compile + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + compile @@ -856,9 +886,16 @@ compile + + compile + + + compile + + @@ -883,6 +920,8 @@ + +