diff --git a/bsp/ti/c28x/libraries/HAL_Drivers/config/adc_config.h b/bsp/ti/c28x/libraries/HAL_Drivers/config/adc_config.h new file mode 100644 index 0000000000..72da2569a5 --- /dev/null +++ b/bsp/ti/c28x/libraries/HAL_Drivers/config/adc_config.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2006-2022, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2022-10-07 qiyu first version + */ + +#ifndef DRIVERS_CONFIG_ADC_CONFIG_H_ +#define DRIVERS_CONFIG_ADC_CONFIG_H_ +#include "F28x_Project.h" // Device Headerfile and Examples Include File +#include "F2837xD_adc.h" +#include "rtthread.h" +#include "drv_config.h" +#define BSP_USING_ADC1 +#ifdef __cplusplus +extern "C" { +#endif +#ifdef BSP_USING_ADC1 + #ifndef ADC1_CONFIG + #define ADC1_CONFIG \ + { \ + .name = "adc1", \ + .adc_regs = &AdcaRegs, \ + .adc_results = &AdcaResultRegs, \ + } + #endif +#endif +#ifdef BSP_USING_ADC2 + #ifndef ADC2_CONFIG + #define ADC2_CONFIG \ + { \ + .name = "adc2", \ + .adc_regs = &AdcbRegs, \ + .adc_results = &AdcbResultRegs \ + } + #endif +#endif +#ifdef BSP_USING_ADC3 + #ifndef ADC3_CONFIG + #define ADC3_CONFIG \ + { \ + .name = "adc3", \ + .adc_regs = &AdccRegs, \ + .adc_results = &AdccResultRegs \ + } + #endif +#endif +#ifdef __cplusplus +} +#endif +#endif /* DRIVERS_CONFIG_ADC_CONFIG_H_ */ diff --git a/bsp/c28x/libraries/HAL_Drivers/config/pwm_config.h b/bsp/ti/c28x/libraries/HAL_Drivers/config/pwm_config.h similarity index 100% rename from bsp/c28x/libraries/HAL_Drivers/config/pwm_config.h rename to bsp/ti/c28x/libraries/HAL_Drivers/config/pwm_config.h diff --git a/bsp/ti/c28x/libraries/HAL_Drivers/drv_adc.c b/bsp/ti/c28x/libraries/HAL_Drivers/drv_adc.c new file mode 100644 index 0000000000..fb6b0250c6 --- /dev/null +++ b/bsp/ti/c28x/libraries/HAL_Drivers/drv_adc.c @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2006-2022, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2022-10-07 qiyu first version + */ + +#include +#ifdef BSP_USING_ADC +#include "drv_config.h" + +#include "drv_adc.h" +#include "rtdbg.h" + + +static struct c28x_adc c28x_adc_obj[] = +{ +#ifdef BSP_USING_ADC1 + ADC1_CONFIG, +#endif + +#ifdef BSP_USING_ADC2 + ADC2_CONFIG, +#endif + +#ifdef BSP_USING_ADC3 + ADC3_CONFIG, +#endif +}; + + +static rt_err_t c28x_adc_enabled(struct rt_adc_device *device, rt_uint32_t channel, rt_bool_t enabled) +{ + volatile struct ADC_REGS *c28x_adc_regs; + RT_ASSERT(device != RT_NULL); + volatile struct c28x_adc *c28x_adc_handler; + c28x_adc_handler = (struct c28x_adc *)device->parent.user_data; + c28x_adc_regs = c28x_adc_handler->adc_regs; + + if (enabled) + { + /* + * power up the ADC + */ + EALLOW; + c28x_adc_regs->ADCCTL1.bit.ADCPWDNZ = 1; + EDIS; + /* + * delay for 1ms to allow ADC time to power up + */ + DELAY_US(1000); + } + else + { + /* + * power down the ADC + */ + EALLOW; + c28x_adc_regs->ADCCTL1.bit.ADCPWDNZ = 0; + EDIS; + } + + return RT_EOK; +} + +static rt_uint8_t c28x_adc_get_resolution(struct rt_adc_device *device) +{ + struct c28x_adc *c28x_adc_handler; + volatile struct ADC_REGS *c28x_adc_regs; + c28x_adc_handler = (struct c28x_adc *)device->parent.user_data; + c28x_adc_regs = c28x_adc_handler->adc_regs; + RT_ASSERT(device != RT_NULL); + switch(c28x_adc_regs->ADCCTL2.bit.RESOLUTION) + { + case ADC_RESOLUTION_12BIT: + return 12; + case ADC_RESOLUTION_16BIT: + return 16; + default: + return 0; + } +} + +static rt_int16_t c28x_adc_get_vref (struct rt_adc_device *device) +{ + /* + * TODO + * Get Vref + */ + RT_ASSERT(device); + return 3300; +} + +static rt_err_t c28x_adc_get_value(struct rt_adc_device *device, rt_uint32_t channel, rt_uint32_t *value) +{ + RT_ASSERT(device != RT_NULL); + RT_ASSERT(value != RT_NULL); + + struct c28x_adc *c28x_adc_handler = (struct c28x_adc*)device->parent.user_data; + volatile struct ADC_REGS *c28x_adc_regs = c28x_adc_handler->adc_regs; + volatile struct ADC_RESULT_REGS *c28x_adc_result_regs = c28x_adc_handler->adc_results; + + /* + * configure channel + * only use SOC0 for now + */ + EALLOW; + c28x_adc_regs->ADCSOC0CTL.bit.CHSEL = channel; /* SOC0 will convert pin A0 */ + EDIS; + /* + * start conversions immediately via software, ADCA + */ + c28x_adc_regs->ADCSOCFRC1.all = 0x0001; //SOC0 + /* + * wait for ADCA to complete, then acknowledge flag + */ + while(c28x_adc_regs->ADCINTFLG.bit.ADCINT1 == 0); + c28x_adc_regs->ADCINTFLGCLR.bit.ADCINT1 = 1; + + /* + * store results + */ + *value = (rt_uint32_t)c28x_adc_result_regs->ADCRESULT0; + + return RT_EOK; +} + +static const struct rt_adc_ops stm_adc_ops = +{ + .enabled = c28x_adc_enabled, + .convert = c28x_adc_get_value, + .get_resolution = c28x_adc_get_resolution, + .get_vref = c28x_adc_get_vref, +}; + +static rt_err_t HAL_ADC_Init(volatile struct ADC_REGS *c28x_adc_handler) +{ + int adc_controller_num = 0; + Uint16 acqps; + + EALLOW; + /* + * write configurations + */ + c28x_adc_handler->ADCCTL2.bit.PRESCALE = 6; //set ADCCLK divider to /4 + if(c28x_adc_handler == &AdcaRegs) + { + adc_controller_num = 0; + }else if(c28x_adc_handler == &AdcbRegs) + { + adc_controller_num = 1; + } + else if(c28x_adc_handler == &AdccRegs) + { + adc_controller_num = 2; + } + else if(c28x_adc_handler == &AdcdRegs) + { + adc_controller_num = 3; + } + AdcSetMode(adc_controller_num, ADC_RESOLUTION, ADC_SIGNALMODE_SINGLE); + c28x_adc_handler->ADCCTL1.bit.INTPULSEPOS = 1; + EDIS; + + /* + * determine minimum acquisition window (in SYSCLKS) based on resolution + */ + if(ADC_RESOLUTION_12BIT == AdcaRegs.ADCCTL2.bit.RESOLUTION) + { + acqps = 14; //75ns + } + else + { + /* + * resolution is 16-bit + */ + acqps = 63; //320ns + } + + /* + * Select the channels to convert and end of conversion flag + */ + EALLOW; + c28x_adc_handler->ADCSOC0CTL.bit.ACQPS = acqps; //sample window is acqps + 1 SYSCLK cycles + c28x_adc_handler->ADCINTSEL1N2.bit.INT1SEL = 0; //end of SOC0 will set INT1 flag + c28x_adc_handler->ADCINTSEL1N2.bit.INT1E = 1; //enable INT1 flag + c28x_adc_handler->ADCINTFLGCLR.bit.ADCINT1 = 1; //make sure INT1 flag is cleared + EDIS; + return RT_EOK; +} + +static int c28x_adc_init(void) +{ + int result = RT_EOK; + /* + * save adc name + */ + int i = 0; + /* ADC init */ + for (i = 0; i < sizeof(c28x_adc_obj) / sizeof(c28x_adc_obj[0]); i++) + { + if (HAL_ADC_Init(c28x_adc_obj[i].adc_regs) != RT_EOK) + { + LOG_E("%s init failed", c28x_adc_obj[i].name); + result = -RT_ERROR; + } + else + { + /* register ADC device */ + if (rt_hw_adc_register(&c28x_adc_obj[i].c28x_adc_device, c28x_adc_obj[i].name, &stm_adc_ops, &c28x_adc_obj[i]) == RT_EOK) + { + LOG_D("%s init success", c28x_adc_obj[i].name); + } + else + { + LOG_E("%s register failed", c28x_adc_obj[i].name); + result = -RT_ERROR; + } + } + } + + return result; +} +INIT_BOARD_EXPORT(c28x_adc_init); + +#endif /* BSP_USING_ADC */ diff --git a/bsp/ti/c28x/libraries/HAL_Drivers/drv_adc.h b/bsp/ti/c28x/libraries/HAL_Drivers/drv_adc.h new file mode 100644 index 0000000000..7cbd14bbfe --- /dev/null +++ b/bsp/ti/c28x/libraries/HAL_Drivers/drv_adc.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2006-2022, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2022-10-07 qiyu first version + */ + +#ifndef DRIVERS_DRV_ADC_H_ +#define DRIVERS_DRV_ADC_H_ +#ifdef BSP_ADC_USING_12BIT +#define ADC_RESOLUTION ADC_RESOLUTION_12BIT +#else +#define ADC_RESOLUTION ADC_RESOLUTION_16BIT +#endif +#include "rtdevice.h" +#ifdef BSP_USING_ADC + +struct c28x_adc +{ + struct rt_adc_device c28x_adc_device; + volatile struct ADC_REGS *adc_regs; + volatile struct ADC_RESULT_REGS *adc_results; + const char *name; +}; +#endif /* BSP_USING_ADC */ + +#endif /* DRIVERS_DRV_ADC_H_ */ diff --git a/bsp/c28x/libraries/HAL_Drivers/drv_config.h b/bsp/ti/c28x/libraries/HAL_Drivers/drv_config.h similarity index 91% rename from bsp/c28x/libraries/HAL_Drivers/drv_config.h rename to bsp/ti/c28x/libraries/HAL_Drivers/drv_config.h index 926bfc9ad9..b73ec398a2 100644 --- a/bsp/c28x/libraries/HAL_Drivers/drv_config.h +++ b/bsp/ti/c28x/libraries/HAL_Drivers/drv_config.h @@ -12,5 +12,6 @@ #define DRIVERS_DRV_CONFIG_H_ #include "config/pwm_config.h" +#include "config/adc_config.h" #endif /* DRIVERS_DRV_CONFIG_H_ */ diff --git a/bsp/c28x/libraries/HAL_Drivers/drv_gpio.c b/bsp/ti/c28x/libraries/HAL_Drivers/drv_gpio.c similarity index 100% rename from bsp/c28x/libraries/HAL_Drivers/drv_gpio.c rename to bsp/ti/c28x/libraries/HAL_Drivers/drv_gpio.c diff --git a/bsp/c28x/libraries/HAL_Drivers/drv_gpio.h b/bsp/ti/c28x/libraries/HAL_Drivers/drv_gpio.h similarity index 100% rename from bsp/c28x/libraries/HAL_Drivers/drv_gpio.h rename to bsp/ti/c28x/libraries/HAL_Drivers/drv_gpio.h diff --git a/bsp/c28x/libraries/HAL_Drivers/drv_pwm.c b/bsp/ti/c28x/libraries/HAL_Drivers/drv_pwm.c similarity index 100% rename from bsp/c28x/libraries/HAL_Drivers/drv_pwm.c rename to bsp/ti/c28x/libraries/HAL_Drivers/drv_pwm.c diff --git a/bsp/c28x/libraries/HAL_Drivers/drv_pwm.h b/bsp/ti/c28x/libraries/HAL_Drivers/drv_pwm.h similarity index 100% rename from bsp/c28x/libraries/HAL_Drivers/drv_pwm.h rename to bsp/ti/c28x/libraries/HAL_Drivers/drv_pwm.h diff --git a/bsp/c28x/libraries/HAL_Drivers/drv_sci.c b/bsp/ti/c28x/libraries/HAL_Drivers/drv_sci.c similarity index 100% rename from bsp/c28x/libraries/HAL_Drivers/drv_sci.c rename to bsp/ti/c28x/libraries/HAL_Drivers/drv_sci.c diff --git a/bsp/c28x/libraries/HAL_Drivers/drv_sci.h b/bsp/ti/c28x/libraries/HAL_Drivers/drv_sci.h similarity index 100% rename from bsp/c28x/libraries/HAL_Drivers/drv_sci.h rename to bsp/ti/c28x/libraries/HAL_Drivers/drv_sci.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Adc_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Adc_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Adc_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Adc_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Can_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Can_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Can_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Can_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Cla_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Cla_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Cla_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Cla_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Cla_typedefs.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Cla_typedefs.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Cla_typedefs.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Cla_typedefs.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Dma_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Dma_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Dma_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Dma_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_EPwm_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_EPwm_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_EPwm_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_EPwm_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Emif_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Emif_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Emif_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Emif_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Examples.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Examples.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Examples.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Examples.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_GlobalPrototypes.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_GlobalPrototypes.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_GlobalPrototypes.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_GlobalPrototypes.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Gpio_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Gpio_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Gpio_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Gpio_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_I2c_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_I2c_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_I2c_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_I2c_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Ipc_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Ipc_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Ipc_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Ipc_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Ipc_drivers.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Ipc_drivers.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Ipc_drivers.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Ipc_drivers.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Pie_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Pie_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Pie_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Pie_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_SWPrioritizedIsrLevels.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_SWPrioritizedIsrLevels.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_SWPrioritizedIsrLevels.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_SWPrioritizedIsrLevels.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_SysCtrl_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_SysCtrl_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_SysCtrl_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_SysCtrl_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Systick_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Systick_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Systick_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Systick_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Upp_defines.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Upp_defines.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_Upp_defines.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_Upp_defines.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_cputimervars.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_cputimervars.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_cputimervars.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_cputimervars.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_defaultisr.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_defaultisr.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_defaultisr.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_defaultisr.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_sci_io.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_sci_io.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_sci_io.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_sci_io.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_sdfm_drivers.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_sdfm_drivers.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_sdfm_drivers.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_sdfm_drivers.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_struct.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_struct.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F2837xD_struct.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F2837xD_struct.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/F28x_Project.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/F28x_Project.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/F28x_Project.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/F28x_Project.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/device.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/device.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/device.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/device.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/driverlib.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/driverlib.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/driverlib.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/driverlib.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/stdint.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/stdint.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/stdint.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/stdint.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/usb.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/usb.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/usb.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/usb.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/include/usb_hal.h b/bsp/ti/c28x/libraries/tms320f28379d/common/include/usb_hal.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/include/usb_hal.h rename to bsp/ti/c28x/libraries/tms320f28379d/common/include/usb_hal.h diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Adc.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Adc.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Adc.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Adc.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_CodeStartBranch.asm b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_CodeStartBranch.asm similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_CodeStartBranch.asm rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_CodeStartBranch.asm diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_CpuTimers.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_CpuTimers.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_CpuTimers.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_CpuTimers.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_DBGIER.asm b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_DBGIER.asm similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_DBGIER.asm rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_DBGIER.asm diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_DefaultISR.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_DefaultISR.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_DefaultISR.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_DefaultISR.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Dma.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Dma.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Dma.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Dma.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_ECap.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_ECap.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_ECap.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_ECap.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_EPwm.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_EPwm.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_EPwm.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_EPwm.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_EQep.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_EQep.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_EQep.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_EQep.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Emif.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Emif.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Emif.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Emif.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Gpio.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Gpio.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Gpio.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Gpio.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_I2C.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_I2C.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_I2C.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_I2C.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver_Lite.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver_Lite.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver_Lite.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver_Lite.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver_Util.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver_Util.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver_Util.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Ipc_Driver_Util.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Mcbsp.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Mcbsp.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Mcbsp.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Mcbsp.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_PieCtrl.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_PieCtrl.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_PieCtrl.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_PieCtrl.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_PieVect.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_PieVect.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_PieVect.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_PieVect.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_SWPrioritizedPieVect.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_SWPrioritizedPieVect.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_SWPrioritizedPieVect.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_SWPrioritizedPieVect.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Sci.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Sci.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Sci.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Sci.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Spi.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Spi.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Spi.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Spi.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_SysCtrl.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_SysCtrl.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_SysCtrl.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_SysCtrl.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_TempSensorConv.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_TempSensorConv.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_TempSensorConv.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_TempSensorConv.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Upp.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Upp.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_Upp.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_Upp.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_can.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_can.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_can.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_can.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_sci_io.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_sci_io.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_sci_io.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_sci_io.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_sdfm_drivers.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_sdfm_drivers.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_sdfm_drivers.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_sdfm_drivers.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_struct.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_struct.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_struct.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_struct.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_usDelay.asm b/bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_usDelay.asm similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/F2837xD_usDelay.asm rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/F2837xD_usDelay.asm diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/device.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/device.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/device.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/device.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/usb.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/usb.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/usb.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/usb.c diff --git a/bsp/c28x/libraries/tms320f28379d/common/source/usb_hal.c b/bsp/ti/c28x/libraries/tms320f28379d/common/source/usb_hal.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/common/source/usb_hal.c rename to bsp/ti/c28x/libraries/tms320f28379d/common/source/usb_hal.c diff --git a/bsp/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_BIOS_cpu1.cmd b/bsp/ti/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_BIOS_cpu1.cmd similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_BIOS_cpu1.cmd rename to bsp/ti/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_BIOS_cpu1.cmd diff --git a/bsp/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_BIOS_cpu2.cmd b/bsp/ti/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_BIOS_cpu2.cmd similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_BIOS_cpu2.cmd rename to bsp/ti/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_BIOS_cpu2.cmd diff --git a/bsp/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_nonBIOS_cpu1.cmd b/bsp/ti/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_nonBIOS_cpu1.cmd similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_nonBIOS_cpu1.cmd rename to bsp/ti/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_nonBIOS_cpu1.cmd diff --git a/bsp/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_nonBIOS_cpu2.cmd b/bsp/ti/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_nonBIOS_cpu2.cmd similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_nonBIOS_cpu2.cmd rename to bsp/ti/c28x/libraries/tms320f28379d/headers/cmd/F2837xD_Headers_nonBIOS_cpu2.cmd diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_adc.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_adc.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_adc.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_adc.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_analogsubsys.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_analogsubsys.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_analogsubsys.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_analogsubsys.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_can.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_can.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_can.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_can.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_cla.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_cla.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_cla.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_cla.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_cmpss.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_cmpss.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_cmpss.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_cmpss.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_cputimer.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_cputimer.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_cputimer.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_cputimer.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_dac.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_dac.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_dac.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_dac.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_dcsm.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_dcsm.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_dcsm.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_dcsm.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_device.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_device.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_device.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_device.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_dma.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_dma.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_dma.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_dma.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_ecap.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_ecap.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_ecap.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_ecap.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_emif.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_emif.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_emif.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_emif.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_epwm.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_epwm.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_epwm.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_epwm.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_epwm_xbar.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_epwm_xbar.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_epwm_xbar.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_epwm_xbar.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_eqep.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_eqep.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_eqep.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_eqep.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_flash.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_flash.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_flash.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_flash.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_gpio.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_gpio.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_gpio.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_gpio.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_i2c.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_i2c.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_i2c.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_i2c.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_input_xbar.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_input_xbar.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_input_xbar.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_input_xbar.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_ipc.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_ipc.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_ipc.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_ipc.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_mcbsp.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_mcbsp.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_mcbsp.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_mcbsp.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_memconfig.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_memconfig.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_memconfig.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_memconfig.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_nmiintrupt.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_nmiintrupt.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_nmiintrupt.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_nmiintrupt.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_output_xbar.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_output_xbar.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_output_xbar.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_output_xbar.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_piectrl.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_piectrl.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_piectrl.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_piectrl.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_pievect.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_pievect.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_pievect.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_pievect.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_sci.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_sci.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_sci.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_sci.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_sdfm.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_sdfm.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_sdfm.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_sdfm.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_spi.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_spi.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_spi.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_spi.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_sysctrl.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_sysctrl.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_sysctrl.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_sysctrl.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_upp.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_upp.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_upp.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_upp.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_xbar.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_xbar.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_xbar.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_xbar.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_xint.h b/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_xint.h similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/include/F2837xD_xint.h rename to bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_xint.h diff --git a/bsp/c28x/libraries/tms320f28379d/headers/source/F2837xD_GlobalVariableDefs.c b/bsp/ti/c28x/libraries/tms320f28379d/headers/source/F2837xD_GlobalVariableDefs.c similarity index 100% rename from bsp/c28x/libraries/tms320f28379d/headers/source/F2837xD_GlobalVariableDefs.c rename to bsp/ti/c28x/libraries/tms320f28379d/headers/source/F2837xD_GlobalVariableDefs.c diff --git a/bsp/c28x/tms320f28379d/.ccsproject b/bsp/ti/c28x/tms320f28379d/.ccsproject similarity index 100% rename from bsp/c28x/tms320f28379d/.ccsproject rename to bsp/ti/c28x/tms320f28379d/.ccsproject diff --git a/bsp/c28x/tms320f28379d/.config b/bsp/ti/c28x/tms320f28379d/.config similarity index 99% rename from bsp/c28x/tms320f28379d/.config rename to bsp/ti/c28x/tms320f28379d/.config index 15627f816e..670b11aaff 100644 --- a/bsp/c28x/tms320f28379d/.config +++ b/bsp/ti/c28x/tms320f28379d/.config @@ -127,7 +127,7 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64 # CONFIG_RT_USING_I2C is not set # CONFIG_RT_USING_PHY is not set CONFIG_RT_USING_PIN=y -# CONFIG_RT_USING_ADC is not set +CONFIG_RT_USING_ADC=y # CONFIG_RT_USING_DAC is not set CONFIG_RT_USING_PWM=y # CONFIG_RT_USING_MTD_NOR is not set @@ -672,7 +672,12 @@ CONFIG_BSP_USING_GPIO=y CONFIG_BSP_USING_UART=y CONFIG_BSP_USING_UART1=y # CONFIG_BSP_USING_PWM is not set -# CONFIG_BSP_USING_ADC is not set +CONFIG_BSP_USING_ADC=y +CONFIG_BSP_USING_ADC1=y +CONFIG_BSP_ADC_USING_12BIT=y +# CONFIG_BSP_ADC_USING_16BIT is not set +CONFIG_BSP_USING_ADC2=y +CONFIG_BSP_USING_ADC3=y # CONFIG_BSP_USING_ONCHIP_RTC is not set # CONFIG_BSP_USING_WDT is not set # CONFIG_BSP_USING_SDIO is not set diff --git a/bsp/c28x/tms320f28379d/.cproject b/bsp/ti/c28x/tms320f28379d/.cproject similarity index 64% rename from bsp/c28x/tms320f28379d/.cproject rename to bsp/ti/c28x/tms320f28379d/.cproject index 36f16276d4..d3421753e2 100644 --- a/bsp/c28x/tms320f28379d/.cproject +++ b/bsp/ti/c28x/tms320f28379d/.cproject @@ -15,8 +15,8 @@ - - - + @@ -115,8 +116,8 @@ - - - + diff --git a/bsp/c28x/tms320f28379d/.gitignore b/bsp/ti/c28x/tms320f28379d/.gitignore similarity index 100% rename from bsp/c28x/tms320f28379d/.gitignore rename to bsp/ti/c28x/tms320f28379d/.gitignore diff --git a/bsp/c28x/tms320f28379d/.project b/bsp/ti/c28x/tms320f28379d/.project similarity index 88% rename from bsp/c28x/tms320f28379d/.project rename to bsp/ti/c28x/tms320f28379d/.project index fe05f8c849..e8a85337b5 100644 --- a/bsp/c28x/tms320f28379d/.project +++ b/bsp/ti/c28x/tms320f28379d/.project @@ -43,197 +43,202 @@ finsh 2 - PARENT-2-PROJECT_LOC/components/finsh + virtual:/virtual libraries 2 virtual:/virtual + + DeviceDrivers/adc.c + 1 + PARENT-4-PROJECT_LOC/components/drivers/misc/adc.c + DeviceDrivers/ipc 2 - PARENT-2-PROJECT_LOC/components/drivers/ipc + PARENT-4-PROJECT_LOC/components/drivers/ipc DeviceDrivers/pin.c 1 - PARENT-3-PROJECT_LOC/components/drivers/misc/pin.c + PARENT-4-PROJECT_LOC/components/drivers/misc/pin.c DeviceDrivers/rt_drv_pwm.c 1 - PARENT-3-PROJECT_LOC/components/drivers/misc/rt_drv_pwm.c + PARENT-4-PROJECT_LOC/components/drivers/misc/rt_drv_pwm.c DeviceDrivers/serial.c 1 - PARENT-3-PROJECT_LOC/components/drivers/serial/serial.c + PARENT-4-PROJECT_LOC/components/drivers/serial/serial.c Kernel/Kconfig 1 - PARENT-3-PROJECT_LOC/src/Kconfig + PARENT-4-PROJECT_LOC/src/Kconfig Kernel/SConscript 1 - PARENT-3-PROJECT_LOC/src/SConscript + PARENT-4-PROJECT_LOC/src/SConscript Kernel/clock.c 1 - PARENT-3-PROJECT_LOC/src/clock.c + PARENT-4-PROJECT_LOC/src/clock.c Kernel/components.c 1 - PARENT-3-PROJECT_LOC/src/components.c + PARENT-4-PROJECT_LOC/src/components.c Kernel/cpu.c 1 - PARENT-3-PROJECT_LOC/src/cpu.c + PARENT-4-PROJECT_LOC/src/cpu.c Kernel/device.c 1 - PARENT-3-PROJECT_LOC/src/device.c + PARENT-4-PROJECT_LOC/src/device.c Kernel/idle.c 1 - PARENT-3-PROJECT_LOC/src/idle.c + PARENT-4-PROJECT_LOC/src/idle.c Kernel/ipc.c 1 - PARENT-3-PROJECT_LOC/src/ipc.c + PARENT-4-PROJECT_LOC/src/ipc.c Kernel/irq.c 1 - PARENT-3-PROJECT_LOC/src/irq.c + PARENT-4-PROJECT_LOC/src/irq.c Kernel/kservice.c 1 - PARENT-3-PROJECT_LOC/src/kservice.c + PARENT-4-PROJECT_LOC/src/kservice.c Kernel/mem.c 1 - PARENT-3-PROJECT_LOC/src/mem.c + PARENT-4-PROJECT_LOC/src/mem.c Kernel/memheap.c 1 - PARENT-3-PROJECT_LOC/src/memheap.c + PARENT-4-PROJECT_LOC/src/memheap.c Kernel/mempool.c 1 - PARENT-3-PROJECT_LOC/src/mempool.c + PARENT-4-PROJECT_LOC/src/mempool.c Kernel/object.c 1 - PARENT-3-PROJECT_LOC/src/object.c + PARENT-4-PROJECT_LOC/src/object.c Kernel/scheduler.c 1 - PARENT-3-PROJECT_LOC/src/scheduler.c + PARENT-4-PROJECT_LOC/src/scheduler.c Kernel/signal.c 1 - PARENT-3-PROJECT_LOC/src/signal.c + PARENT-4-PROJECT_LOC/src/signal.c Kernel/slab.c 1 - PARENT-3-PROJECT_LOC/src/slab.c + PARENT-4-PROJECT_LOC/src/slab.c Kernel/thread.c 1 - PARENT-3-PROJECT_LOC/src/thread.c + PARENT-4-PROJECT_LOC/src/thread.c Kernel/timer.c 1 - PARENT-3-PROJECT_LOC/src/timer.c + PARENT-4-PROJECT_LOC/src/timer.c c28x/SConscript 1 - PARENT-3-PROJECT_LOC/libcpu/ti-dsp/c28x/SConscript + PARENT-4-PROJECT_LOC/libcpu/ti-dsp/c28x/SConscript c28x/context.s 1 - PARENT-3-PROJECT_LOC/libcpu/ti-dsp/c28x/context.s + PARENT-4-PROJECT_LOC/libcpu/ti-dsp/c28x/context.s c28x/cpuport.c 1 - PARENT-3-PROJECT_LOC/libcpu/ti-dsp/c28x/cpuport.c + PARENT-4-PROJECT_LOC/libcpu/ti-dsp/c28x/cpuport.c finsh/Kconfig 1 - PARENT-3-PROJECT_LOC/components/finsh/Kconfig + PARENT-4-PROJECT_LOC/components/finsh/Kconfig finsh/SConscript 1 - PARENT-3-PROJECT_LOC/components/finsh/SConscript + PARENT-4-PROJECT_LOC/components/finsh/SConscript finsh/cmd.c 1 - PARENT-3-PROJECT_LOC/components/finsh/cmd.c + PARENT-4-PROJECT_LOC/components/finsh/cmd.c finsh/finsh.h 1 - PARENT-3-PROJECT_LOC/components/finsh/finsh.h + PARENT-4-PROJECT_LOC/components/finsh/finsh.h finsh/msh.c 1 - PARENT-3-PROJECT_LOC/components/finsh/msh.c + PARENT-4-PROJECT_LOC/components/finsh/msh.c finsh/msh.h 1 - PARENT-3-PROJECT_LOC/components/finsh/msh.h + PARENT-4-PROJECT_LOC/components/finsh/msh.h finsh/msh_file.c 1 - PARENT-3-PROJECT_LOC/components/finsh/msh_file.c + PARENT-4-PROJECT_LOC/components/finsh/msh_file.c finsh/msh_parse.c 1 - PARENT-3-PROJECT_LOC/components/finsh/msh_parse.c + PARENT-4-PROJECT_LOC/components/finsh/msh_parse.c finsh/msh_parse.h 1 - PARENT-3-PROJECT_LOC/components/finsh/msh_parse.h + PARENT-4-PROJECT_LOC/components/finsh/msh_parse.h finsh/shell.c 1 - PARENT-3-PROJECT_LOC/components/finsh/shell.c + PARENT-4-PROJECT_LOC/components/finsh/shell.c finsh/shell.h 1 - PARENT-3-PROJECT_LOC/components/finsh/shell.h + PARENT-4-PROJECT_LOC/components/finsh/shell.h libraries/HAL_Drivers @@ -245,51 +250,21 @@ 2 virtual:/virtual - - DeviceDrivers/ipc/SConscript - 1 - PARENT-3-PROJECT_LOC/components/drivers/ipc/SConscript - - - DeviceDrivers/ipc/completion.c - 1 - PARENT-3-PROJECT_LOC/components/drivers/ipc/completion.c - - - DeviceDrivers/ipc/dataqueue.c - 1 - PARENT-3-PROJECT_LOC/components/drivers/ipc/dataqueue.c - - - DeviceDrivers/ipc/pipe.c - 1 - PARENT-3-PROJECT_LOC/components/drivers/ipc/pipe.c - - - DeviceDrivers/ipc/ringblk_buf.c - 1 - PARENT-3-PROJECT_LOC/components/drivers/ipc/ringblk_buf.c - - - DeviceDrivers/ipc/ringbuffer.c - 1 - PARENT-3-PROJECT_LOC/components/drivers/ipc/ringbuffer.c - - - DeviceDrivers/ipc/waitqueue.c - 1 - PARENT-3-PROJECT_LOC/components/drivers/ipc/waitqueue.c - - - DeviceDrivers/ipc/workqueue.c - 1 - PARENT-3-PROJECT_LOC/components/drivers/ipc/workqueue.c - libraries/HAL_Drivers/config 2 virtual:/virtual + + libraries/HAL_Drivers/drv_adc.c + 1 + PARENT-1-PROJECT_LOC/libraries/HAL_Drivers/drv_adc.c + + + libraries/HAL_Drivers/drv_adc.h + 1 + PARENT-1-PROJECT_LOC/libraries/HAL_Drivers/drv_adc.h + libraries/HAL_Drivers/drv_config.h 1 @@ -335,6 +310,11 @@ 2 virtual:/virtual + + libraries/HAL_Drivers/config/adc_config.h + 1 + PARENT-1-PROJECT_LOC/libraries/HAL_Drivers/config/adc_config.h + libraries/HAL_Drivers/config/pwm_config.h 1 diff --git a/bsp/c28x/tms320f28379d/.settings/org.eclipse.cdt.codan.core.prefs b/bsp/ti/c28x/tms320f28379d/.settings/org.eclipse.cdt.codan.core.prefs similarity index 100% rename from bsp/c28x/tms320f28379d/.settings/org.eclipse.cdt.codan.core.prefs rename to bsp/ti/c28x/tms320f28379d/.settings/org.eclipse.cdt.codan.core.prefs diff --git a/bsp/c28x/tms320f28379d/.settings/org.eclipse.cdt.debug.core.prefs b/bsp/ti/c28x/tms320f28379d/.settings/org.eclipse.cdt.debug.core.prefs similarity index 100% rename from bsp/c28x/tms320f28379d/.settings/org.eclipse.cdt.debug.core.prefs rename to bsp/ti/c28x/tms320f28379d/.settings/org.eclipse.cdt.debug.core.prefs diff --git a/bsp/c28x/tms320f28379d/.settings/org.eclipse.core.resources.prefs b/bsp/ti/c28x/tms320f28379d/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from bsp/c28x/tms320f28379d/.settings/org.eclipse.core.resources.prefs rename to bsp/ti/c28x/tms320f28379d/.settings/org.eclipse.core.resources.prefs diff --git a/bsp/c28x/tms320f28379d/2837x_FLASH_lnk_cpu1.cmd b/bsp/ti/c28x/tms320f28379d/2837x_FLASH_lnk_cpu1.cmd similarity index 100% rename from bsp/c28x/tms320f28379d/2837x_FLASH_lnk_cpu1.cmd rename to bsp/ti/c28x/tms320f28379d/2837x_FLASH_lnk_cpu1.cmd diff --git a/bsp/c28x/tms320f28379d/2837x_RAM_lnk_cpu1.cmd b/bsp/ti/c28x/tms320f28379d/2837x_RAM_lnk_cpu1.cmd similarity index 100% rename from bsp/c28x/tms320f28379d/2837x_RAM_lnk_cpu1.cmd rename to bsp/ti/c28x/tms320f28379d/2837x_RAM_lnk_cpu1.cmd diff --git a/bsp/c28x/tms320f28379d/Kconfig b/bsp/ti/c28x/tms320f28379d/Kconfig similarity index 95% rename from bsp/c28x/tms320f28379d/Kconfig rename to bsp/ti/c28x/tms320f28379d/Kconfig index e832d7eb6d..3e83f321c5 100644 --- a/bsp/c28x/tms320f28379d/Kconfig +++ b/bsp/ti/c28x/tms320f28379d/Kconfig @@ -8,7 +8,7 @@ config BSP_DIR config RTT_DIR string option env="RTT_ROOT" - default "../../.." + default "../../../.." # you can change the RTT_ROOT default "../.." to your rtthread_root, # example : default "F:/git_repositories/rt-thread" diff --git a/bsp/c28x/tms320f28379d/README.md b/bsp/ti/c28x/tms320f28379d/README.md similarity index 98% rename from bsp/c28x/tms320f28379d/README.md rename to bsp/ti/c28x/tms320f28379d/README.md index 42ffc1ee89..ef453d80a7 100644 --- a/bsp/c28x/tms320f28379d/README.md +++ b/bsp/ti/c28x/tms320f28379d/README.md @@ -80,11 +80,11 @@ TMS320F28379D 程序的编译和下载要使用的是 TI 官方提供的 Code Co | 驱动 | 支持情况 | 备注 | | ------ | ---- | :------: | -| CPU Timer | 支持 | | +| CPU Timer | | | | GPIO | 支持 | | | SCI | 支持 | SCIA/B/C | -| ePWM | | | -| ADC | | | +| ePWM | 支持| | +| ADC |支持| | | DAC | | | | I2C | | | | SPI | | | diff --git a/bsp/c28x/tms320f28379d/applications/startup.c b/bsp/ti/c28x/tms320f28379d/applications/startup.c similarity index 88% rename from bsp/c28x/tms320f28379d/applications/startup.c rename to bsp/ti/c28x/tms320f28379d/applications/startup.c index def94440fd..16854cfc06 100644 --- a/bsp/c28x/tms320f28379d/applications/startup.c +++ b/bsp/ti/c28x/tms320f28379d/applications/startup.c @@ -7,7 +7,7 @@ * Date Author Notes * 2006-08-31 Bernard first implementation * 2018-09-02 xuzhuoyi modify for TMS320F28379D version - * 2022-08-21 yuqi modify the entry function + * 2022-08-21 qiyu modify the entry function */ #include diff --git a/bsp/c28x/tms320f28379d/board/Kconfig b/bsp/ti/c28x/tms320f28379d/board/Kconfig similarity index 97% rename from bsp/c28x/tms320f28379d/board/Kconfig rename to bsp/ti/c28x/tms320f28379d/board/Kconfig index 740e3073ea..1510a81dfc 100644 --- a/bsp/c28x/tms320f28379d/board/Kconfig +++ b/bsp/ti/c28x/tms320f28379d/board/Kconfig @@ -980,9 +980,51 @@ menu "On-chip Peripheral Drivers" default n select RT_USING_ADC if BSP_USING_ADC - config BSP_USING_ADC1 + menuconfig BSP_USING_ADC1 bool "Enable ADC1" default n + if BSP_USING_ADC1 + choice + prompt "Select resolution" + default BSP_ADC_USING_12BIT + + config BSP_ADC_USING_12BIT + bool "ADC Using 12 bit resolution" + + config BSP_ADC_USING_16BIT + bool "ADC Using 16 bit resolution" + endchoice + endif + menuconfig BSP_USING_ADC2 + bool "Enable ADC2" + default n + if BSP_USING_ADC2 + choice + prompt "Select resolution" + default BSP_ADC_USING_12BIT + + config BSP_ADC_USING_12BIT + bool "ADC Using 12 bit resolution" + + config BSP_ADC_USING_16BIT + bool "ADC Using 16 bit resolution" + endchoice + endif + menuconfig BSP_USING_ADC3 + bool "Enable ADC3" + default n + if BSP_USING_ADC3 + choice + prompt "Select resolution" + default BSP_ADC_USING_12BIT + + config BSP_ADC_USING_12BIT + bool "ADC Using 12 bit resolution" + + config BSP_ADC_USING_16BIT + bool "ADC Using 16 bit resolution" + endchoice + endif endif menuconfig BSP_USING_ONCHIP_RTC diff --git a/bsp/c28x/tms320f28379d/board/board.c b/bsp/ti/c28x/tms320f28379d/board/board.c similarity index 100% rename from bsp/c28x/tms320f28379d/board/board.c rename to bsp/ti/c28x/tms320f28379d/board/board.c diff --git a/bsp/c28x/tms320f28379d/board/board.h b/bsp/ti/c28x/tms320f28379d/board/board.h similarity index 100% rename from bsp/c28x/tms320f28379d/board/board.h rename to bsp/ti/c28x/tms320f28379d/board/board.h diff --git a/bsp/c28x/tms320f28379d/figures/build.png b/bsp/ti/c28x/tms320f28379d/figures/build.png similarity index 100% rename from bsp/c28x/tms320f28379d/figures/build.png rename to bsp/ti/c28x/tms320f28379d/figures/build.png diff --git a/bsp/c28x/tms320f28379d/figures/debug_as.png b/bsp/ti/c28x/tms320f28379d/figures/debug_as.png similarity index 100% rename from bsp/c28x/tms320f28379d/figures/debug_as.png rename to bsp/ti/c28x/tms320f28379d/figures/debug_as.png diff --git a/bsp/c28x/tms320f28379d/figures/import.png b/bsp/ti/c28x/tms320f28379d/figures/import.png similarity index 100% rename from bsp/c28x/tms320f28379d/figures/import.png rename to bsp/ti/c28x/tms320f28379d/figures/import.png diff --git a/bsp/c28x/tms320f28379d/figures/import_dia.png b/bsp/ti/c28x/tms320f28379d/figures/import_dia.png similarity index 100% rename from bsp/c28x/tms320f28379d/figures/import_dia.png rename to bsp/ti/c28x/tms320f28379d/figures/import_dia.png diff --git a/bsp/c28x/tms320f28379d/figures/launch-28379d.png b/bsp/ti/c28x/tms320f28379d/figures/launch-28379d.png similarity index 100% rename from bsp/c28x/tms320f28379d/figures/launch-28379d.png rename to bsp/ti/c28x/tms320f28379d/figures/launch-28379d.png diff --git a/bsp/c28x/tms320f28379d/figures/launching.png b/bsp/ti/c28x/tms320f28379d/figures/launching.png similarity index 100% rename from bsp/c28x/tms320f28379d/figures/launching.png rename to bsp/ti/c28x/tms320f28379d/figures/launching.png diff --git a/bsp/c28x/tms320f28379d/rtconfig.h b/bsp/ti/c28x/tms320f28379d/rtconfig.h similarity index 96% rename from bsp/c28x/tms320f28379d/rtconfig.h rename to bsp/ti/c28x/tms320f28379d/rtconfig.h index fc87483220..12617588d5 100644 --- a/bsp/c28x/tms320f28379d/rtconfig.h +++ b/bsp/ti/c28x/tms320f28379d/rtconfig.h @@ -77,6 +77,7 @@ #define RT_USING_SERIAL_V1 #define RT_SERIAL_RB_BUFSZ 64 #define RT_USING_PIN +#define RT_USING_ADC #define RT_USING_PWM /* Using USB */ @@ -187,6 +188,11 @@ #define BSP_USING_GPIO #define BSP_USING_UART #define BSP_USING_UART1 +#define BSP_USING_ADC +#define BSP_USING_ADC1 +#define BSP_ADC_USING_12BIT +#define BSP_USING_ADC2 +#define BSP_USING_ADC3 /* Board extended module Drivers */ diff --git a/bsp/c28x/tms320f28379d/rtconfig_project.h b/bsp/ti/c28x/tms320f28379d/rtconfig_project.h similarity index 100% rename from bsp/c28x/tms320f28379d/rtconfig_project.h rename to bsp/ti/c28x/tms320f28379d/rtconfig_project.h diff --git a/bsp/c28x/tms320f28379d/targetConfigs/TMS320F28379D.ccxml b/bsp/ti/c28x/tms320f28379d/targetConfigs/TMS320F28379D.ccxml similarity index 100% rename from bsp/c28x/tms320f28379d/targetConfigs/TMS320F28379D.ccxml rename to bsp/ti/c28x/tms320f28379d/targetConfigs/TMS320F28379D.ccxml diff --git a/bsp/c28x/tms320f28379d/targetConfigs/readme.txt b/bsp/ti/c28x/tms320f28379d/targetConfigs/readme.txt similarity index 100% rename from bsp/c28x/tms320f28379d/targetConfigs/readme.txt rename to bsp/ti/c28x/tms320f28379d/targetConfigs/readme.txt diff --git a/components/drivers/misc/adc.c b/components/drivers/misc/adc.c index 783c7a3853..a85be09fe9 100644 --- a/components/drivers/misc/adc.c +++ b/components/drivers/misc/adc.c @@ -228,7 +228,7 @@ static int adc(int argc, char **argv) { result = rt_adc_enable(adc_device, atoi(argv[2])); result_str = (result == RT_EOK) ? "success" : "failure"; - rt_kprintf("%s channel %d enables %s \n", adc_device->parent.parent.name, atoi(argv[2]), result_str); + rt_kprintf("%s channel %d enables %s \n", adc_device->parent.parent.name, (rt_base_t)atoi(argv[2]), result_str); } else { @@ -240,7 +240,7 @@ static int adc(int argc, char **argv) if (argc == 3) { value = rt_adc_read(adc_device, atoi(argv[2])); - rt_kprintf("%s channel %d read value is 0x%08X \n", adc_device->parent.parent.name, atoi(argv[2]), value); + rt_kprintf("%s channel %d read value is 0x%08X \n", adc_device->parent.parent.name, (rt_base_t)atoi(argv[2]), value); } else { @@ -253,7 +253,7 @@ static int adc(int argc, char **argv) { result = rt_adc_disable(adc_device, atoi(argv[2])); result_str = (result == RT_EOK) ? "success" : "failure"; - rt_kprintf("%s channel %d disable %s \n", adc_device->parent.parent.name, atoi(argv[2]), result_str); + rt_kprintf("%s channel %d disable %s \n", adc_device->parent.parent.name, (rt_base_t)atoi(argv[2]), result_str); } else { @@ -266,7 +266,7 @@ static int adc(int argc, char **argv) { voltage = rt_adc_voltage(adc_device, atoi(argv[2])); result_str = (result == RT_EOK) ? "success" : "failure"; - rt_kprintf("%s channel %d voltage is %d.%03dV \n", adc_device->parent.parent.name, atoi(argv[2]), voltage / 1000, voltage % 1000); + rt_kprintf("%s channel %d voltage is %d.%03dV \n", adc_device->parent.parent.name, (rt_base_t)atoi(argv[2]), voltage / 1000, voltage % 1000); } else {