Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/hal_drv/bl602_hal/bl_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ int bl_adc_start(void)

int bl_adc_gpio_init(int gpio_num)
{
uint8_t adc_pin = gpio_num;
GLB_GPIO_Type adc_pin = gpio_num;

GLB_GPIO_Func_Init(GPIO_FUN_ANALOG, &adc_pin, 1);

Expand Down
1 change: 1 addition & 0 deletions components/hal_drv/bl602_hal/bl_dac_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <FreeRTOS.h>
#include "bl_dac_audio.h"

#include "bl602_common.h"
Expand Down
2 changes: 1 addition & 1 deletion components/hal_drv/bl602_hal/bl_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void i2c_set_freq(int freq, int i2cx)

void i2c_gpio_init(int i2cx)
{
uint8_t gpiopins[2];
GLB_GPIO_Type gpiopins[2];
if (i2cx == I2C0) {
gpiopins[0] = GLB_GPIO_PIN_4;
gpiopins[1] = GLB_GPIO_PIN_3;
Expand Down
1 change: 1 addition & 0 deletions components/hal_drv/bl602_hal/hal_board.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ static int hal_board_load_fdt_info(const void *dtb)
} else {
pwr_table_ble = 0;
}
pwr_table_ble += 0; // Suppress "variable set but not used" warning
blog_info("set pwr_table_ble = %ld in dts\r\n", pwr_table_ble);
#ifdef CFG_BLE_ENABLE
ble_controller_set_tx_pwr(pwr_table_ble);
Expand Down
2 changes: 1 addition & 1 deletion components/hal_drv/bl602_hal/hal_button.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ void fdt_button_module_init(const void *fdt, int button_offset)

for (i = 0; i < GPIO_MODULE_MAX; i++) {
memset(gpio_node, 0, sizeof(gpio_node));
sprintf(gpio_node, "gpio%d", i);
snprintf(gpio_node, sizeof(gpio_node), "gpio%d", i);
offset1 = fdt_subnode_offset(fdt, button_offset, gpio_node);
if (0 > offset1) {
//log_warn("gpio[%d] %s NULL. \r\n", i, gpio_node);
Expand Down
2 changes: 1 addition & 1 deletion components/hal_drv/bl602_hal/hal_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int hal_ir_init_from_dts(uint32_t fdt_input, uint32_t dtb_offset)
int ctrltype = 0;

uint8_t pin = 0;
uint16_t interval = NULL;
uint16_t interval = 0;

addr_prop = fdt_getprop(fdt, dtb_offset, "ctrltype", &lentmp);
if (addr_prop == NULL) {
Expand Down
2 changes: 1 addition & 1 deletion components/hal_drv/bl602_hal/hal_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void bl_spi0_dma_int_handler_rx(void);

static void hal_gpio_init(spi_hw_t *arg)
{
uint8_t gpiopins[4];
GLB_GPIO_Type gpiopins[4];

if (!arg) {
blog_error("arg err.\r\n");
Expand Down
2 changes: 1 addition & 1 deletion components/hal_drv/bl602_hal/hal_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static uint32_t user_clz(uint32_t priorities)

struct romapi_freertos_map* hal_sys_romapi_get(void)
{
extern uint8_t __global_pointer_head$;
extern uint8_t __global_pointer_head$[0x498];
uint32_t *gp_data_start = (uint32_t*)(&__global_pointer_head$);
struct romapi_freertos_map* romapi_freertos;

Expand Down
1 change: 1 addition & 0 deletions components/hal_drv/bl602_hal/hal_wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
#include <FreeRTOS.h>
#include <task.h>
#include "hal_wifi.h"
Expand Down