Skip to content

Commit

Permalink
Merge branch 'RT-Thread:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ComerLater authored Apr 19, 2024
2 parents 02cfeef + cd77f98 commit 55011b2
Show file tree
Hide file tree
Showing 1,957 changed files with 922,483 additions and 22,341 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/bsp_buildings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ jobs:
fail-fast: false
matrix:
legs:
- RTT_BSP: "RT-Thread Online Packages"
- RTT_BSP: "RT-Thread Online Packages (STM32F407 RT-Spark)"
RTT_TOOL_CHAIN: "sourcery-arm"
SUB_RTT_BSP:
- "stm32/stm32f407-rt-spark"
- RTT_BSP: "RTduino/Arduino Libraries"
- RTT_BSP: "RTduino/Arduino Libraries (STM32F412 Nucleo)"
RTT_TOOL_CHAIN: "sourcery-arm"
SUB_RTT_BSP:
- "stm32/stm32f412-st-nucleo"
- RTT_BSP: "RTduino/Arduino Libraries (Raspberry Pico)"
RTT_TOOL_CHAIN: "sourcery-arm"
SUB_RTT_BSP:
- "raspberry-pico"
- RTT_BSP: "others_at32_hc32"
RTT_TOOL_CHAIN: "sourcery-arm"
Expand Down Expand Up @@ -136,6 +139,7 @@ jobs:
- "stm32/stm32f401-weact-blackpill"
- "stm32/stm32f405-smdz-breadfruit"
- "stm32/stm32f407-armfly-v5"
- "stm32/stm32f407-lckfb-skystar"
- "stm32/stm32f407-atk-explorer"
- "stm32/stm32f407-robomaster-c"
- "stm32/stm32f407-st-discovery"
Expand Down Expand Up @@ -176,6 +180,7 @@ jobs:
- "stm32/stm32h750-artpi"
- "stm32/stm32h750-weact-ministm32h7xx"
- "stm32/stm32h750-fk750m1-vbt6"
- "stm32/stm32h7s7-st-disco"
- "stm32/stm32mp157a-st-discovery"
- "stm32/stm32mp157a-st-ev1"
- "stm32/stm32u575-st-nucleo"
Expand Down Expand Up @@ -218,6 +223,7 @@ jobs:
- "renesas/ra8m1-ek"
- "renesas/ra8d1-ek"
- "renesas/ra8d1-vision-board"
- "renesas/rzt2m_rsk"
- "frdm-k64f"
- "xplorer4330/M4"
- RTT_BSP: "gd32_n32_apm32"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/manual_trigger_scons_except_STM32_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ jobs:
#- {RTT_BSP_NAME: "hk32_hk32f030c8-mini", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "hk32/hk32f030c8-mini"} #scons dist有问题
- {RTT_BSP_NAME: "hpmicro_hpm6750evk", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "hpmicro/hpm6750evk"}
- {RTT_BSP_NAME: "hpmicro_hpm6750evkmini", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "hpmicro/hpm6750evkmini"}
- {RTT_BSP_NAME: "ht32f12366", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "ht32/ht32f12366"}
- {RTT_BSP_NAME: "ht32f52352", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "ht32/ht32f52352"}
#- {RTT_BSP_NAME: "imx_imx6ull-smart", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "imx/imx6ull-smart"} # toolchain还没支持
- {RTT_BSP_NAME: "imx6sx_cortex-a9", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "imx6sx/cortex-a9"}
- {RTT_BSP_NAME: "imx6ul", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "imx6ul"}
Expand Down
4 changes: 2 additions & 2 deletions bsp/ESP32_C3/drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ static void mcu_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
/*TODO:set gpio out put mode */
}

static rt_int8_t mcu_pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t mcu_pin_read(rt_device_t dev, rt_base_t pin)
{
rt_int8_t value;
rt_ssize_t value;
value = gpio_get_level(pin);
return value;
}
Expand Down
4 changes: 2 additions & 2 deletions bsp/Infineon/libraries/HAL_Drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void ifx_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
cyhal_gpio_write(gpio_pin, value);
}

static rt_int8_t ifx_pin_read(struct rt_device *device, rt_base_t pin)
static rt_ssize_t ifx_pin_read(struct rt_device *device, rt_base_t pin)
{
rt_uint16_t gpio_pin;

Expand All @@ -160,7 +160,7 @@ static rt_int8_t ifx_pin_read(struct rt_device *device, rt_base_t pin)
}
else
{
return -RT_ERROR;
return -RT_EINVAL;
}

return cyhal_gpio_read(gpio_pin);
Expand Down
8 changes: 6 additions & 2 deletions bsp/Vango/v85xx/drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ static void v85xx_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
}
}

static rt_int8_t v85xx_pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t v85xx_pin_read(rt_device_t dev, rt_base_t pin)
{
GPIO_TypeDef *gpio_port;
uint16_t gpio_pin;
int value = PIN_LOW;
rt_ssize_t value = PIN_LOW;

if (PIN_PORT(pin) == PIN_V85XXPORT_A)
{
Expand All @@ -157,6 +157,10 @@ static rt_int8_t v85xx_pin_read(rt_device_t dev, rt_base_t pin)
gpio_pin = PIN_V85XXPIN(pin);
value = GPIOBToF_ReadInputDataBit(gpio_port, gpio_pin);
}
else
{
return -RT_EINVAL;
}

return value;
}
Expand Down
4 changes: 2 additions & 2 deletions bsp/Vango/v85xxp/drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ static void V85XXP_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
}
}

static rt_int8_t V85XXP_pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t V85XXP_pin_read(rt_device_t dev, rt_base_t pin)
{
GPIO_Type *gpio_port;
uint16_t gpio_pin;
int value = PIN_LOW;
rt_ssize_t value = PIN_LOW;

if (PIN_PORT(pin) == PIN_V85XXPPORT_A)
{
Expand Down
4 changes: 2 additions & 2 deletions bsp/acm32/acm32f0x0-nucleo/drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static void acm32_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
HAL_GPIO_WritePin(index->gpio, index->pin, (enum_PinState_t)value);
}

static rt_int8_t acm32_pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t acm32_pin_read(rt_device_t dev, rt_base_t pin)
{
int value;
const struct pin_index *index;
Expand All @@ -198,7 +198,7 @@ static rt_int8_t acm32_pin_read(rt_device_t dev, rt_base_t pin)
index = get_pin(pin);
if (index == RT_NULL)
{
return value;
return -RT_EINVAL;
}

value = HAL_GPIO_ReadPin(index->gpio, index->pin);
Expand Down
2 changes: 1 addition & 1 deletion bsp/acm32/acm32f0x0-nucleo/drivers/drv_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static rt_tick_t _pm_timer_get_tick(struct rt_pm *pm)
{
rt_tick_t tick;
RT_ASSERT(pm != RT_NULL);

tick = 1;

return get_os_tick_from_pm_tick(tick);
Expand Down
4 changes: 2 additions & 2 deletions bsp/acm32/acm32f4xx-nucleo/drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static void _pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
HAL_GPIO_WritePin(index->gpio, index->pin, (enum_PinState_t)value);
}

static rt_int8_t _pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t _pin_read(rt_device_t dev, rt_base_t pin)
{
int value;
const struct pin_index *index;
Expand All @@ -216,7 +216,7 @@ static rt_int8_t _pin_read(rt_device_t dev, rt_base_t pin)
index = get_pin(pin);
if (index == RT_NULL)
{
return value;
return -RT_EINVAL;
}

value = HAL_GPIO_ReadPin(index->gpio, index->pin);
Expand Down
4 changes: 2 additions & 2 deletions bsp/airm2m/air105/libraries/rt_drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ static void air105_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
}
}

static rt_int8_t air105_pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t air105_pin_read(rt_device_t dev, rt_base_t pin)
{
if (pin < GPIO_MAX)
{
return GPIO_Input(pin);
}
else
{
return -1;
return -RT_EINVAL;
}
}

Expand Down
6 changes: 5 additions & 1 deletion bsp/airm2m/air32f103/libraries/rt_drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static void air32_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
}
}

static rt_int8_t air32_pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t air32_pin_read(rt_device_t dev, rt_base_t pin)
{
GPIO_TypeDef *gpio_port;
uint16_t gpio_pin;
Expand All @@ -169,6 +169,10 @@ static rt_int8_t air32_pin_read(rt_device_t dev, rt_base_t pin)
gpio_pin = PIN_AIRPIN(pin);
value = GPIO_ReadInputDataBit(gpio_port, gpio_pin);
}
else
{
return -RT_EINVAL;
}

return value;
}
Expand Down
4 changes: 2 additions & 2 deletions bsp/allwinner/libraries/drivers/drv_pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ static void hal_pin_write(struct rt_device *device, rt_base_t pin, rt_uint8_t va
hal_gpio_set_data(pin,value);
}

static rt_int8_t hal_pin_read(struct rt_device *device, rt_base_t pin)
static rt_ssize_t hal_pin_read(struct rt_device *device, rt_base_t pin)
{
gpio_data_t value;
hal_gpio_get_data(pin,&value);
return (rt_int8_t)value;
return (rt_ssize_t)value;
}

static rt_err_t hal_pin_attach_irq(struct rt_device *device, rt_base_t pin,
Expand Down
2 changes: 1 addition & 1 deletion bsp/allwinner/libraries/drivers/touch/drv_touch.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* COPYRIGHT (C) 2012-2022, Shanghai Real-Thread Technology Co., Ltd
* COPYRIGHT (C) 2012-2024, Shanghai Real-Thread Technology Co., Ltd
* All rights reserved.
* Change Logs:
* Date Author Notes
Expand Down
2 changes: 1 addition & 1 deletion bsp/allwinner/libraries/drivers/touch/drv_touch.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* COPYRIGHT (C) 2012-2022, Shanghai Real-Thread Technology Co., Ltd
* COPYRIGHT (C) 2012-2024, Shanghai Real-Thread Technology Co., Ltd
* All rights reserved.
* Change Logs:
* Date Author Notes
Expand Down
4 changes: 2 additions & 2 deletions bsp/allwinner_tina/drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,12 @@ static void pin_write(struct rt_device *dev, rt_base_t pin, rt_uint8_t value)
gpio_set_value(pin_index[pin].pin_port, pin_index[pin].pin, value);
}

static rt_int8_t pin_read(struct rt_device *device, rt_base_t pin)
static rt_ssize_t pin_read(struct rt_device *device, rt_base_t pin)
{
if ((pin > PIN_NUM(pin_index)) || (pin_index[pin].magic != PIN_MAGIC))
{
LOG_E("pin:%d value wrongful", pin);
return 0;
return -RT_EINVAL;
}

return gpio_get_value(pin_index[pin].pin_port, pin_index[pin].pin);
Expand Down
6 changes: 5 additions & 1 deletion bsp/apm32/libraries/Drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static void apm32_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
}
}

static rt_int8_t apm32_pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t apm32_pin_read(rt_device_t dev, rt_base_t pin)
{
GPIO_T *gpio_port;
uint16_t gpio_pin;
Expand All @@ -185,6 +185,10 @@ static rt_int8_t apm32_pin_read(rt_device_t dev, rt_base_t pin)
gpio_pin = PIN_APMPIN(pin);
value = GPIO_ReadInputBit(gpio_port, gpio_pin);
}
else
{
return -RT_EINVAL;
}

return value;
}
Expand Down
4 changes: 2 additions & 2 deletions bsp/apollo2/board/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ void am_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
}
}

rt_int8_t am_pin_read(rt_device_t dev, rt_base_t pin)
rt_ssize_t am_pin_read(rt_device_t dev, rt_base_t pin)
{
rt_int8_t value = PIN_LOW;
rt_ssize_t value = PIN_LOW;

if (am_hal_gpio_pin_config_read(pin) == AM_HAL_GPIO_OUTPUT)
{
Expand Down
2 changes: 2 additions & 0 deletions bsp/at32/libraries/rt_drivers/drv_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ static rt_err_t at32_get_adc_value(struct rt_adc_device *device, rt_int8_t chann
/* adc_x regular channels configuration */
#if defined (SOC_SERIES_AT32F435) || defined (SOC_SERIES_AT32F437) || \
defined (SOC_SERIES_AT32F423)
adc_flag_clear(adc_x, ADC_OCCE_FLAG);
adc_ordinary_channel_set(adc_x, (adc_channel_select_type)channel, 1, ADC_SAMPLETIME_247_5);
#else
adc_flag_clear(adc_x, ADC_CCE_FLAG);
adc_ordinary_channel_set(adc_x, (adc_channel_select_type)channel, 1, ADC_SAMPLETIME_239_5);
#endif

Expand Down
7 changes: 6 additions & 1 deletion bsp/at32/libraries/rt_drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static void at32_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
gpio_bits_write(gpio_port, gpio_pin, (confirm_state)value);
}

static rt_int8_t at32_pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t at32_pin_read(rt_device_t dev, rt_base_t pin)
{
gpio_type *gpio_port;
uint16_t gpio_pin;
Expand All @@ -198,6 +198,11 @@ static rt_int8_t at32_pin_read(rt_device_t dev, rt_base_t pin)
gpio_pin = PIN_ATPIN(pin);
value = gpio_input_data_bit_read(gpio_port, gpio_pin);
}
else
{
return -RT_EINVAL;
}

return value;
}

Expand Down
2 changes: 1 addition & 1 deletion bsp/avr32/drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static void at32uc3_pin_write(struct rt_device *dev, rt_base_t pin, rt_uint8_t v
}
}

static rt_int8_t at32uc3_pin_read(struct rt_device *device, rt_base_t pin)
static rt_ssize_t at32uc3_pin_read(struct rt_device *device, rt_base_t pin)
{
RT_ASSERT((AVR32_BSP_GPIO_PMIN <= pin) && (pin <= AVR32_BSP_GPIO_PMAX));
return (gpio_get_pin_value(pin) ? PIN_HIGH : PIN_LOW);
Expand Down
18 changes: 9 additions & 9 deletions bsp/avr32/drivers/drv_soft_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void avr32_i2c_gpio_init(struct avr32_i2c *i2c)

rt_pin_mode(cfg->scl, PIN_MODE_OUTPUT_OD);
gpio_set_gpio_open_drain_pin(cfg->scl);

rt_pin_mode(cfg->sda, PIN_MODE_OUTPUT_OD);
gpio_set_gpio_open_drain_pin(cfg->sda);
}
Expand All @@ -50,11 +50,11 @@ static void avr32_set_sda(void *data, rt_int32_t state)
struct avr32_soft_i2c_config* cfg = (struct avr32_soft_i2c_config*)data;
if (state)
{
gpio_set_gpio_open_drain_pin(cfg->sda);
gpio_set_gpio_open_drain_pin(cfg->sda);
}
else
{
gpio_clr_gpio_open_drain_pin(cfg->sda);
gpio_clr_gpio_open_drain_pin(cfg->sda);
}
}

Expand All @@ -69,11 +69,11 @@ static void avr32_set_scl(void *data, rt_int32_t state)
struct avr32_soft_i2c_config* cfg = (struct avr32_soft_i2c_config*)data;
if (state)
{
gpio_set_gpio_open_drain_pin(cfg->scl);
gpio_set_gpio_open_drain_pin(cfg->scl);
}
else
{
gpio_clr_gpio_open_drain_pin(cfg->scl);
gpio_clr_gpio_open_drain_pin(cfg->scl);
}
}

Expand Down Expand Up @@ -126,10 +126,10 @@ static rt_err_t avr32_i2c_bus_unlock(const struct avr32_soft_i2c_config *cfg)
{
while (i++ < 9)
{
gpio_set_gpio_open_drain_pin(cfg->scl);
rt_hw_us_delay(100);
gpio_clr_gpio_open_drain_pin(cfg->scl);
rt_hw_us_delay(100);
gpio_set_gpio_open_drain_pin(cfg->scl);
rt_hw_us_delay(100);
gpio_clr_gpio_open_drain_pin(cfg->scl);
rt_hw_us_delay(100);
}
}
if (PIN_LOW == gpio_get_gpio_open_drain_pin_output_value(cfg->sda))
Expand Down
2 changes: 1 addition & 1 deletion bsp/beaglebone/drivers/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static void am33xx_pin_write(struct rt_device *device, rt_base_t pin, rt_uint8_t
}
}

static rt_int8_t am33xx_pin_read(struct rt_device *device, rt_base_t pin)
static rt_ssize_t am33xx_pin_read(struct rt_device *device, rt_base_t pin)
{
RT_ASSERT(pin >= 0 && pin < 128);
rt_base_t gpiox = pin >> 5;
Expand Down
2 changes: 1 addition & 1 deletion bsp/bluetrum/libraries/hal_drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static void ab32_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
hal_gpio_write(PORT_SFR(port), gpio_pin, (rt_uint8_t)value);
}

static rt_int8_t ab32_pin_read(rt_device_t dev, rt_base_t pin)
static rt_ssize_t ab32_pin_read(rt_device_t dev, rt_base_t pin)
{
rt_uint8_t port = PIN_PORT(pin);
rt_uint8_t gpio_pin = pin - port_table[port].total_pin;
Expand Down
Loading

0 comments on commit 55011b2

Please sign in to comment.