feat: rename file name and format code
This commit is contained in:
@@ -18,13 +18,13 @@ extern "C"
|
||||
|
||||
#if (DEF_ELITE_MODEL == DEF_ELITE_DEV)
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_EDC_V2_0)
|
||||
#include "edc20_io.h"
|
||||
#include "elite_edc_v2_0_io.h"
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_PEL_V2_0)
|
||||
#include "pel20_io.h"
|
||||
#include "elite_pel_v2_0_io.h"
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_PEL_V3_0)
|
||||
#include "pel_v3_0_io.h"
|
||||
#include "elite_pel_v3_0_io.h"
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_CPG_V1_1)
|
||||
#include "cpg11_io.h"
|
||||
#include "elite_cpg_v1_1_io.h"
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_MMM_V1_0)
|
||||
#else
|
||||
#error "Not implemented xxx_io.h"
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
#define __ELITE_DEV_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "app_config.h"
|
||||
#include "elite.h"
|
||||
|
||||
const elite_instance_t *dev_init(void);
|
||||
const elite_instance_t *dev_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -2,12 +2,14 @@
|
||||
#define __EDC20_IO_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "nrf_drv_spi.h"
|
||||
#include "nrf_gpio.h"
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
#define ADCA2_PIN NRF_GPIO_PIN_MAP(0, 25)
|
||||
#define ADCA1_PIN NRF_GPIO_PIN_MAP(0, 19)
|
||||
@@ -45,51 +47,51 @@ extern "C" {
|
||||
#define SPIM_MOSI_PIN NRF_GPIO_PIN_MAP(0, 7)
|
||||
#define SPIM_MISO_PIN NRF_GPIO_PIN_MAP(1, 9)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float mV_start;
|
||||
float mV_stop;
|
||||
float mV_step;
|
||||
uint32_t uS_step;
|
||||
uint32_t cycles;
|
||||
bool hi_z_en;
|
||||
} elite_dac_config_t;
|
||||
typedef struct
|
||||
{
|
||||
float mV_start;
|
||||
float mV_stop;
|
||||
float mV_step;
|
||||
uint32_t uS_step;
|
||||
uint32_t cycles;
|
||||
bool hi_z_en;
|
||||
} elite_dac_config_t;
|
||||
|
||||
void gpio_init(void);
|
||||
void circuit_selection_vin_0(void);
|
||||
void circuit_selection_vin_1(void);
|
||||
void circuit_selection_vin_2(void);
|
||||
void circuit_selection_Iin_0(void);
|
||||
void circuit_selection_Iin_1(void);
|
||||
void circuit_selection_Iin_2(void);
|
||||
void circuit_selection_Iin_3(void);
|
||||
void circuit_selection_Iin_4(void);
|
||||
void circuit_selection_dac_coarse_tune_c(void);
|
||||
void circuit_selection_dac_fine_tune_f0(void);
|
||||
void circuit_selection_dac_fine_tune_f1(void);
|
||||
void circuit_selection_dac_fine_tune_f2(void);
|
||||
void circuit_selection_cv3_config(void);
|
||||
void circuit_selection_cc_config(void);
|
||||
void circuit_selection_dac_circuit_open(void);
|
||||
void gpio_init(void);
|
||||
void circuit_selection_vin_0(void);
|
||||
void circuit_selection_vin_1(void);
|
||||
void circuit_selection_vin_2(void);
|
||||
void circuit_selection_Iin_0(void);
|
||||
void circuit_selection_Iin_1(void);
|
||||
void circuit_selection_Iin_2(void);
|
||||
void circuit_selection_Iin_3(void);
|
||||
void circuit_selection_Iin_4(void);
|
||||
void circuit_selection_dac_coarse_tune_c(void);
|
||||
void circuit_selection_dac_fine_tune_f0(void);
|
||||
void circuit_selection_dac_fine_tune_f1(void);
|
||||
void circuit_selection_dac_fine_tune_f2(void);
|
||||
void circuit_selection_cv3_config(void);
|
||||
void circuit_selection_cc_config(void);
|
||||
void circuit_selection_dac_circuit_open(void);
|
||||
|
||||
void twi_init(void);
|
||||
void twi0_write_reg(uint8_t slave_addr, uint8_t reg_addr, uint8_t *data, uint8_t data_len);
|
||||
void twi0_read_reg(uint8_t slave_addr, uint8_t reg_addr, uint8_t *p_rx_buf, uint8_t rx_buffer_length);
|
||||
void twi_init(void);
|
||||
void twi0_write_reg(uint8_t slave_addr, uint8_t reg_addr, uint8_t *data, uint8_t data_len);
|
||||
void twi0_read_reg(uint8_t slave_addr, uint8_t reg_addr, uint8_t *p_rx_buf, uint8_t rx_buffer_length);
|
||||
|
||||
void spi_init(void);
|
||||
void spi1_write(uint8_t *p_tx_buffer, uint16_t tx_buffer_length);
|
||||
void spim_xfer(uint32_t cs_pin, nrf_spim_mode_t mode, uint8_t *p_tx_buffer, uint16_t tx_buffer_length, uint8_t *p_rx_buf, uint16_t rx_buffer_length);
|
||||
void spi2_set_mode(nrf_drv_spi_mode_t mode);
|
||||
void spi_init(void);
|
||||
void spi1_write(uint8_t *p_tx_buffer, uint16_t tx_buffer_length);
|
||||
void spim_xfer(uint32_t cs_pin, nrf_spim_mode_t mode, uint8_t *p_tx_buffer, uint16_t tx_buffer_length, uint8_t *p_rx_buf, uint16_t rx_buffer_length);
|
||||
void spi2_set_mode(nrf_drv_spi_mode_t mode);
|
||||
|
||||
void edc20_io_init(void);
|
||||
void edc20_io_power_off(void);
|
||||
void edc20_io_power_on(void);
|
||||
void edc20_io_init(void);
|
||||
void edc20_io_power_off(void);
|
||||
void edc20_io_power_on(void);
|
||||
|
||||
void edc20_dac_tim_start(uint32_t period, void (*callback)(void *p_arg), void *p_arg);
|
||||
void edc20_dac_tim_stop(void);
|
||||
void edc20_dac_tim_start(uint32_t period, void (*callback)(void *p_arg), void *p_arg);
|
||||
void edc20_dac_tim_stop(void);
|
||||
|
||||
void edc20_adc_tim_start(elite_dac_config_t *p_config);
|
||||
void edc20_adc_tim_stop(void);
|
||||
void edc20_adc_tim_start(elite_dac_config_t *p_config);
|
||||
void edc20_adc_tim_stop(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -13,8 +13,8 @@ extern "C"
|
||||
#define VERSION_DATE_YEAR 25
|
||||
#define VERSION_DATE_MONTH 7
|
||||
#define VERSION_DATE_DAY 30
|
||||
#define VERSION_DATE_HOUR 16
|
||||
#define VERSION_DATE_MINUTE 52
|
||||
#define VERSION_DATE_HOUR 17
|
||||
#define VERSION_DATE_MINUTE 45
|
||||
|
||||
#define PEL_0P5R_MASK (0x01 << 0)
|
||||
#define PEL_1P0R_MASK (0x01 << 1)
|
||||
+6
-6
@@ -3,17 +3,17 @@
|
||||
#include "elite.h"
|
||||
|
||||
#if (DEF_ELITE_MODEL == DEF_ELITE_DEV)
|
||||
#include "elite_dev.h"
|
||||
#include "elite_dev_v1_0.h"
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_EDC_V2_0)
|
||||
#include "edc.h"
|
||||
#include "elite_edc_v2_0.h"
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_PEL_V2_0)
|
||||
#include "pel.h"
|
||||
#include "elite_pel_v2_0.h"
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_PEL_V3_0)
|
||||
#include "pel_v3_0.h"
|
||||
#include "elite_pel_v3_0.h"
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_CPG_V1_1)
|
||||
#include "cpg.h"
|
||||
#include "elite_cpg_v1_1.h"
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_MMM_V1_0)
|
||||
#include "elite_mmm.h"
|
||||
#include "elite_mmm_v1_0.h"
|
||||
#else
|
||||
#error "Unknown DEF_ELITE_MODEL"
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "app_config.h"
|
||||
|
||||
#include "cpg.h"
|
||||
#include "elite_cpg_v1_1.h"
|
||||
|
||||
#if (DEF_ELITE_MODEL == DEF_ELITE_CPG_V1_1)
|
||||
|
||||
@@ -31,20 +31,20 @@ typedef struct
|
||||
} pulse_gen_hw_t;
|
||||
|
||||
pulse_gen_hw_t pulse_gen_hw[] = {
|
||||
{.gpiote_idx = { 0, 1, 2, 3 },
|
||||
{ .gpiote_idx = { 0, 1, 2, 3 },
|
||||
.TMR_A = NRF_TIMER1,
|
||||
.TMR_B = NRF_TIMER3,
|
||||
.TMR_A_IRQn = TIMER1_IRQn,
|
||||
.TMR_B_IRQn = TIMER3_IRQn,
|
||||
.p_pulse_gen = NULL,
|
||||
.private = { NULL, 0, 0 }},
|
||||
{.gpiote_idx = { 4, 5, 6, 7 },
|
||||
.private = { NULL, 0, 0 } },
|
||||
{ .gpiote_idx = { 4, 5, 6, 7 },
|
||||
.TMR_A = NRF_TIMER2,
|
||||
.TMR_B = NRF_TIMER4,
|
||||
.TMR_A_IRQn = TIMER2_IRQn,
|
||||
.TMR_B_IRQn = TIMER4_IRQn,
|
||||
.p_pulse_gen = NULL,
|
||||
.private = { NULL, 0, 0 }},
|
||||
.private = { NULL, 0, 0 } },
|
||||
};
|
||||
|
||||
__STATIC_INLINE void config_tmrB(uint32_t hw_idx, pulse_gen_t *p_pulse_gen)
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "app_config.h"
|
||||
|
||||
#include "elite_dev.h"
|
||||
#include "elite_dev_v1_0.h"
|
||||
|
||||
#if (DEF_ELITE_MODEL == DEF_ELITE_DEV)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "app_config.h"
|
||||
|
||||
#include "edc.h"
|
||||
#include "elite_edc_v2_0.h"
|
||||
|
||||
#if (DEF_ELITE_MODEL == DEF_ELITE_EDC_V2_0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "app_config.h"
|
||||
|
||||
#include "edc.h"
|
||||
#include "elite_edc_v2_0.h"
|
||||
|
||||
#if (DEF_ELITE_MODEL == DEF_ELITE_EDC_V2_0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "app_config.h"
|
||||
|
||||
#include "elite_mmm.h"
|
||||
#include "elite_mmm_v1_0.h"
|
||||
|
||||
#if (DEF_ELITE_MODEL == DEF_ELITE_MMM_V1_0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "app_config.h"
|
||||
|
||||
#include "pel.h"
|
||||
#include "elite_pel_v2_0.h"
|
||||
|
||||
#if (DEF_ELITE_MODEL == DEF_ELITE_PEL_V2_0)
|
||||
|
||||
@@ -23,7 +23,7 @@ pel_hw_t pel_hw = {
|
||||
[OUTPUT_R2_IDX] = OUTPUT_R2_CHANNEL,
|
||||
[OUTPUT_VO_IDX] = OUTPUT_VO_CHANNEL,
|
||||
[OUTPUT_VC_IDX] = OUTPUT_VC_CHANNEL,
|
||||
[OUTPUT_VE_IDX] = OUTPUT_VE_CHANNEL},
|
||||
[OUTPUT_VE_IDX] = OUTPUT_VE_CHANNEL },
|
||||
.adc.gain = NRF_SAADC_GAIN1_6,
|
||||
.adc.smaple_time = NRF_SAADC_ACQTIME_3US
|
||||
};
|
||||
@@ -5,17 +5,15 @@
|
||||
#include "adc_drv.h"
|
||||
#include "elite.h"
|
||||
#include "elite_board.h"
|
||||
#include "pel_v3_0.h"
|
||||
#include "pel_v3_0_io.h"
|
||||
#include "elite_pel_v3_0.h"
|
||||
|
||||
#include "message_buffer.h"
|
||||
#include "semphr.h"
|
||||
#include "task.h"
|
||||
#include "timers.h"
|
||||
|
||||
#include "message_buffer.h" //E:\WT\WT_project_code\bmd380_sdk\external\freertos\source\include\message_buffer.h
|
||||
#include "semphr.h" //E:\WT\WT_project_code\bmd380_sdk\external\freertos\source\include\semphr.h
|
||||
#include "task.h" //E:\WT\WT_project_code\bmd380_sdk\external\freertos\source\include\task.h
|
||||
#include "timers.h" //E:\WT\WT_project_code\bmd380_sdk\external\freertos\source\include\timers.h
|
||||
|
||||
#include "nrf_log.h" //E:\WT\WT_project_code\bmd380_sdk\components\libraries\log\nrf_log.h
|
||||
#include "nrfx_gpiote.h" //E:\WT\WT_project_code\bmd380_sdk\modules\nrfx\drivers\include\nrfx_gpiote.h
|
||||
#include "nrf_log.h"
|
||||
#include "nrfx_gpiote.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
Reference in New Issue
Block a user