GPIO
bflb_gpio_init(dev, pin, cfgset)
初始化 GPIO 引脚。
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PINcfgset:GPIO 配置掩码
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_deinit(dev, pin)
反初始化 GPIO 引脚 with input float。
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PIN
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_output_value_mode_enable(dev, pin)
设置 GPIO 引脚 function。
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PIN
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_pin0_31_output(dev, value)
写入 gpio0-31 output 值。
参数:
dev:设备句柄value:output 值 for GPIO0-31
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_pin32_63_output(dev, value)
写入 gpio32-63 output 值。
参数:
dev:设备句柄value:output 值 for GPIO32-63
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_set(dev, pin)
写入 GPIO 引脚 with high level。
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PIN
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_pin0_31_set(dev, value)
设置 gpio0-31 引脚 with bitmap。
参数:
dev:设备句柄value:bitmap 值 for GPIO0-31 to set
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_pin32_63_set(dev, value)
设置 gpio32-63 引脚 with bitmap。
参数:
dev:设备句柄value:bitmap 值 for GPIO32-63 to set
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_reset(dev, pin)
写入 GPIO 引脚 with low level。
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PIN
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_pin0_31_reset(dev, value)
复位 gpio0-31 引脚 with bitmap。
参数:
dev:设备句柄value:bitmap 值 for GPIO0-31 to reset
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_pin32_63_reset(dev, value)
复位 gpio32-63 引脚 with bitmap。
参数:
dev:设备句柄value:bitmap 值 for GPIO32-63 to reset
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_read(dev, pin)
读取 level from GPIO 引脚。
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PIN
📎 设备名速查:支持的设备名(BL616)
返回值:true means high level, otherwise low level
bflb_gpio_pin0_31_read(dev)
读取 level from GPIO 引脚 0~31。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:level of GPIO 引脚 0~31
bflb_gpio_pin32_63_read(dev)
读取 level from GPIO 引脚 32~63。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:level of GPIO pin32~63
bflb_gpio_int_init(dev, pin, trig_mode)
配置 GPIO 引脚 中断.
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PINtrig_mode:模式 to trigger 中断
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_int_mask(dev, pin, mask)
使能 or disable GPIO 引脚 中断。
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PINmask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_get_intstatus(dev, pin)
获取 GPIO 引脚 中断 状态。
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PIN
📎 设备名速查:支持的设备名(BL616)
返回值:true means yes, false means no
bflb_gpio_get_intstatus_pin0_31(dev)
获取 gpio0-31 引脚 中断 状态。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:bitmap of gpio0-31 中断 状态
bflb_gpio_get_intstatus_pin32_63(dev)
获取 gpio32-63 引脚 中断 状态。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:bitmap of gpio32-63 中断 状态
bflb_gpio_int_clear_pin0_31(dev, value)
清除 gpio0-31 中断 状态 with bitmap。
参数:
dev:设备句柄value:bitmap 值 for GPIO0-31 to clear
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_int_clear_pin32_63(dev, value)
清除 gpio32-63 中断 状态 with bitmap。
参数:
dev:设备句柄value:bitmap 值 for GPIO32-63 to clear
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_int_clear(dev, value)
清除 GPIO 引脚 中断 状态。
参数:
dev:设备句柄value:bitmap 值 for GPIO0-31 to clear
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_uart_init(dev, pin, uart_func)
配置 GPIO 引脚 with UART function.
参数:
dev:设备句柄pin:GPIO 引脚, 使用 GPIO_PINuart_func:UART function, 使用 GPIO_UART_FUNC
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_gpio_feature_control(dev, cmd, arg)
Control GPIO feature.
参数:
dev:设备句柄cmd:feature command, 使用 GPIO_CMDarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
bflb_gpio_irq_detach(dev, cmd, arg)
Control GPIO feature.
参数:
dev:设备句柄cmd:feature command, 使用 GPIO_CMDarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
UART 串口
bflb_uart_init(dev, config)
初始化 UART。
参数:
dev:设备句柄config:pointer to save UART 配置
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_uart_link_txdma(dev, enable)
使能 UART tx DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_uart_link_rxdma(dev, enable)
使能 UART rx DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_uart_putchar(dev, ch)
Put one char on UART.
参数:
dev:设备句柄ch:char
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
bflb_uart_getchar(dev)
获取 char from UART。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure, otherwise received char.
bflb_uart_put(dev, ch)
Put a block of 数据 on UART.This is a poll api.
参数:
dev:设备句柄ch:char
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
bflb_uart_put_block(dev, data, len)
Put a block of 数据 on UART.Block before sending done.
参数:
dev:设备句柄data:pointer to save send 数据len:length to send
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
bflb_uart_get(dev)
获取 a block of 数据 from UART. This is a asynchronous api。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure, otherwise received char.
bflb_uart_wait_tx_done(dev)
Wait for tx transfer done and fifo is empty.
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
bflb_uart_txready(dev)
检查 if there is free space in tx fifo。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:Return true if the tranmsit hardware is ready to send another byte
bflb_uart_txempty(dev)
检查 if there is no 数据 in tx fifo。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:Return true if all characters have been sent
bflb_uart_rxavailable(dev)
检查 if there is 数据 in rx fifo。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:true means yes.Otherwise there is no 数据 in rx fifo
bflb_uart_txint_mask(dev, mask)
使能 or disable UART tx fifo threhold 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_uart_rxint_mask(dev, mask)
使能 or disable UART rx fifo threhold 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_uart_errint_mask(dev, mask)
使能 or disable UART error 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_uart_get_intstatus(dev)
获取 UART 中断 状态。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:中断 状态, use @ref UART_INTSTS
bflb_uart_int_clear(dev, int_clear)
清除 UART 中断 状态。
参数:
dev:设备句柄int_clear:clear 值, 使用 UART_INTCLR
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_uart_feature_control(dev, cmd, arg)
Control UART feature.
参数:
dev:设备句柄cmd:feature command, 使用 UART_CMDarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
SPI
bflb_spi_init(dev, config)
初始化 SPI。
参数:
dev:设备句柄config:pointer to save SPI 配置
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_spi_link_txdma(dev, enable)
使能 SPI 发送 DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_spi_link_rxdma(dev, enable)
使能 SPI 接收 DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_spi_poll_send(dev, data)
发送 and receive one 数据 on SPI。
参数:
dev:设备句柄data:数据 to send
📎 设备名速查:支持的设备名(BL616)
返回值:receive 数据
bflb_spi_poll_exchange(dev, txbuffer, rxbuffer, nbytes)
发送 and receive a block of 数据 on SPI。
参数:
dev:设备句柄txbuffer:pointer to send 缓冲区rxbuffer:pointer to receive 缓冲区nbytes:bytes to send
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
bflb_spi_isbusy(dev)
检查 if SPI is busy。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:true means busy, otherwise not.
bflb_spi_txint_mask(dev, mask)
使能 or disable SPI rx fifo threhold 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_spi_rxint_mask(dev, mask)
使能 or disable SPI rx fifo threhold 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_spi_tcint_mask(dev, mask)
使能 or disable SPI transfer done 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_spi_errint_mask(dev, mask)
使能 or disable SPI error 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_spi_rtoint_mask(dev, mask)
使能 or disable SPI receive 超时 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_spi_get_intstatus(dev)
获取 SPI 中断 状态。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:中断 状态, use @ref SPI_INTSTS
bflb_spi_int_clear(dev, int_clear)
清除 SPI 中断 状态。
参数:
dev:设备句柄int_clear:clear 值, 使用 SPI_INTCLR
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_spi_feature_control(dev, cmd, arg)
Control SPI feature.
参数:
dev:设备句柄cmd:feature command, 使用 SPI_CMDarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
I2C
bflb_i2c_init(dev, frequency)
初始化 I2C。
参数:
dev:设备句柄frequency:I2C frequency, range from 305Hz to 400KHz
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_i2c_link_txdma(dev, enable)
使能 I2C 发送 DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_i2c_link_rxdma(dev, enable)
使能 I2C 接收 DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_i2c_transfer(dev, msgs, count)
启动 transferring I2C message。
参数:
dev:设备句柄msgs:pointer to I2C messagecount:message count
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
bflb_i2c_int_mask(dev, int_type, mask)
使能 or disable I2C 中断。
参数:
dev:设备句柄int_type:中断 type ,使用 I2C_INTENmask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_i2c_int_clear(dev, int_clear)
清除 I2C 中断 状态。
参数:
dev:设备句柄int_clear:clear 值, 使用 I2C_INTCLR
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_i2c_get_intstatus(dev)
获取 I2C 中断 状态。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:中断 状态 值, use @ref I2C_INTSTS
bflb_i2c_feature_control(dev, cmd, arg)
Control I2C feature.
参数:
dev:设备句柄cmd:feature commandarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
ADC
bflb_adc_init(dev, config)
初始化 ADC。
参数:
dev:设备句柄config:pointer to save ADC 配置
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_update_adc_trim(dev, config)
更新 ADC 校准参数。
参数:
dev:设备句柄config:pointer to save ADC 配置
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_link_rxdma(dev, enable)
使能 ADC rx DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_set_reference_channel(channel, millivolt)
Select reference 通道.
参数:
channel:通道 numbermillivolt:refercence millivolt
返回值:无
bflb_adc_channel_config(dev, chan, channels)
配置 ADC 通道 to sample.
参数:
dev:设备句柄chan:pointer to the 通道 configurations.channels:pair number of 通道
📎 设备名速查:支持的设备名(BL616)
返回值:Zero on success; a negated errno 值 on failure
bflb_adc_get_count(dev)
Get ADC number of completed conversions
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:number of completed conversions
bflb_adc_rxint_mask(dev, mask)
使能 or disable ADC conversion completion 中断. Triggerring when a 通道 conversion is completed。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_errint_mask(dev, mask)
使能 or disable ADC error 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_get_intstatus(dev)
获取 ADC 中断 instatus。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:中断 instatus 值, use @ref ADC_INTSTS
bflb_adc_int_clear(dev, int_clear)
清除 ADC 中断 instatus。
参数:
dev:设备句柄int_clear:中断 clear 值, 使用 ADC_INTCLR
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_parse_result(dev, buffer, result, count)
Parse ADC conversion 值 into millivolt and actual numerical 值.
参数:
dev:设备句柄buffer:pointer to ADC original 值 from bflb_adc_read_raw apiresult:pointer to save parse resultcount:count to parse
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_tsen_init(dev, tsen_mod)
Initialize ADC temperature sensor
参数:
dev:设备句柄tsen_mod:temperature sensor 模式, 使用 ADC_TSEN_MOD
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_feature_control(dev, cmd, arg)
Control ADC feature.
参数:
dev:设备句柄cmd:feature command. 使用 ADC_CMDarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
ADC v2(仅 Ai-M64 支持)
bflb_adc_init(dev, config)
初始化 ADC。
参数:
dev:设备句柄config:pointer to save ADC 配置
📎 设备名速查:支持的设备名(BL616)
返回值:Zero on success; -EBUSY if another initialization is in progress
bflb_adc_link_rxdma(dev, enable)
使能 ADC regular rx DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_link_rxdma_inject(dev, enable)
使能 ADC inject rx DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_channel_config_internal(dev, chan, channels)
配置 ADC internal regular 通道 to sample.
参数:
dev:设备句柄chan:pointer to the 通道 configurations.channels:pair number of 通道
📎 设备名速查:支持的设备名(BL616)
返回值:Zero on success; a negated errno 值 on failure
bflb_adc_channel_config_external(dev, chan, channels)
配置 ADC external regular 通道 to sample.
参数:
dev:设备句柄chan:pointer to the 通道 configurations.channels:pair number of 通道
📎 设备名速查:支持的设备名(BL616)
返回值:Zero on success; a negated errno 值 on failure
bflb_adc_channel_config_internal_inject(dev, chan, channels)
配置 ADC internal inject 通道 to sample.
参数:
dev:设备句柄chan:pointer to the 通道 configurations.channels:pair number of 通道
📎 设备名速查:支持的设备名(BL616)
返回值:Zero on success; a negated errno 值 on failure
bflb_adc_channel_config_external_inject(dev, chan, channels)
配置 ADC external inject 通道 to sample.
参数:
dev:设备句柄chan:pointer to the 通道 configurations.channels:pair number of 通道
📎 设备名速查:支持的设备名(BL616)
返回值:Zero on success; a negated errno 值 on failure
bflb_adc_start_conversion_inject(dev)
Start ADC inject 通道 conversion
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_stop_conversion_inject(dev)
Stop ADC inject 通道 conversion
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_get_count(dev)
Get ADC number of regular 通道 completed conversions
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:number of completed conversions
bflb_adc_get_count_inject(dev)
Get ADC number of inject 通道 completed conversions
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:number of completed conversions
bflb_adc_read_raw(dev)
Read ADC regular 通道 conversion 值
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:conversion 值
bflb_adc_read_raw_inject(dev)
Read ADC inject 通道 conversion 值
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:conversion 值
bflb_adc_inject_context_save(pos_chan, neg_chan, value, millivolt)
Acquire ADC inject 配置 and save its context. All users sharing ADC inject conversion must acquire a context before changing inject 配置 or starting a conversion. The context must be restored after the conversion 数据 has been consumed. Every successful save call must be paired with exactly one restore call. Do not call restore when save returns an error.
参数:
pos_chan:ADC positive 通道neg_chan:ADC negative 通道value:ADC 值millivolt:ADC voltage result
返回值:见 SDK 头文件
bflb_adc_inject_context_restore(pos_chan, neg_chan, value, millivolt)
恢复 ADC inject 配置 and release its ownership。
参数:
pos_chan:ADC positive 通道neg_chan:ADC negative 通道value:ADC 值millivolt:ADC voltage result
返回值:见 SDK 头文件
bflb_adc_int_mask(dev, int_type, mask)
使能 or disable ADC 中断。
参数:
dev:设备句柄int_type:中断 type 值, 使用 ADC_INTmask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_get_int_status(dev, int_type)
获取 ADC 中断 状态。
参数:
dev:设备句柄int_type:中断 type 值, 使用 ADC_INT
📎 设备名速查:支持的设备名(BL616)
返回值:中断 状态 值, use @ref ADC_INT
bflb_adc_int_clear(dev, int_type)
清除 ADC 中断 状态。
参数:
dev:设备句柄int_type:中断 type 值, 使用 ADC_INT
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_parse_result(dev, buffer, result, count)
Parse ADC conversion 值 into millivolt and actual numerical 值.
参数:
dev:设备句柄buffer:pointer to ADC original 值 from bflb_adc_read_raw or bflb_adc_read_raw_inject apiresult:pointer to save parse resultcount:count to parse
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_adc_tsen_raw_to_temperature(dev, rawdata_P, rawdata_N)
Calculate ADC temperature from TSEN_N and TSEN_P raw words.
参数:
dev:设备句柄rawdata_P:raw word from ADC_INTERNAL_CHANNEL_TSEN_Prawdata_N:raw word from ADC_INTERNAL_CHANNEL_TSEN_N
📎 设备名速查:支持的设备名(BL616)
返回值:temperature
bflb_adc_feature_control(dev, cmd, arg)
Control ADC feature.
参数:
dev:设备句柄cmd:feature command. 使用 ADC_CMDarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
模拟比较器
bflb_acomp_init(acomp_id, config)
初始化 acomp。
参数:
acomp_id:acomp indexconfig:pointer to save acomp 配置
返回值:无
bflb_acomp_enable(acomp_id)
使能 acomp。
参数:
acomp_id:acomp index
返回值:无
bflb_acomp_disable(acomp_id)
关闭 acomp。
参数:
acomp_id:acomp index
返回值:无
bflb_acomp_get_result(acomp_id)
获取 acomp result。
参数:
acomp_id:acomp index
返回值:acomp result
bflb_acomp_gpio_2_chanid(pin, channel)
GPIO change adc_chan_id.
参数:
pin:GPIO indexchannel:ADC 通道 index
返回值:Zero on success; a negated errno 值 on failure
bflb_acomp_chanid_2_gpio(channel, pin)
adc_chan_id change GPIO index.
参数:
channel:ADC 通道 indexpin:GPIO index
返回值:Zero on success; a negated errno 值 on failure
bflb_acomp_get_postive_input(acomp_id)
获取 ACOMP positive 通道 select of acomp index。
参数:
acomp_id:acomp index
返回值:ACOMP positive 通道 select
DAC
bflb_dac_init(dev, frequence)
Initialize DAC frequence. DAC clk = 512K/clk_div, source clock must be 512K
参数:
dev:设备句柄frequence:DAC clock div, 使用 DAC_CLK_DIV
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_dac_link_txdma(dev, enable)
使能 DAC tx DMA。
参数:
dev:设备句柄enable:true means enable, otherwise disable.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_dac_set_dma_format(dev, format)
设置 DAC format in DMA 模式。
参数:
dev:设备句柄format:format type
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_dac_set_value(dev, ch, value)
Set DAC output 值
参数:
dev:设备句柄ch:通道 numbervalue:output 值
📎 设备名速查:支持的设备名(BL616)
返回值:无
DMA
bflb_dma_channel_init(dev, config)
初始化 DMA 通道。
参数:
dev:设备句柄config:pointer to save DMA 通道 配置
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_dma_channel_isbusy(dev)
检查 if DMA 通道 is in busy。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:true means DMA 通道 does not transfer completely, otherwise transfers completely.
bflb_dma_channel_irq_detach(dev)
注销 DMA 通道 transmission completion 中断 回调。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_dma_channel_lli_reload(dev, lli_pool, max_lli_count, transfer, count)
配置 DMA 通道 lli.
参数:
dev:设备句柄lli_pool:pointer to lli poolmax_lli_count:lli pool sizetransfer:pointer to transfer structurecount:transfer count.
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure, otherwise means number of used lli.
bflb_dma_channel_lli_insert(dev, lli_pool, max_lli_count, transfer, count)
插入 DMA 通道 lli node。
参数:
dev:设备句柄lli_pool:pointer to lli poolmax_lli_count:lli pool sizetransfer:pointer to transfer structurecount:transfer count.
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure, otherwise means number of used lli.
bflb_dma_channel_lli_link_head(dev, lli_pool, used_lli_count)
使能 lli continueous 模式。
参数:
dev:设备句柄lli_pool:pointer to lli poolused_lli_count:number of used lli.
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_rx_cycle_dma_process(rx_dma, in_dma_isr)
Rx cycle DMA process
参数:
rx_dma:rx DMA handlein_dma_isr:if called in DMA isr
返回值:无
bflb_dma_feature_control(dev, cmd, arg)
Control DMA feature.
参数:
dev:设备句柄cmd:feature command. 使用 DMA_CMDarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
bflb_dma_channel_tcint_mask(dev, mask)
使能 or disable DMA 通道 transmission completion 中断。
参数:
dev:设备句柄mask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_dma_channel_get_tcint_status(dev)
检查 if DMA 通道 transfers completely。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:true means yes, false means no.
bflb_dma_channel_tcint_clear(dev)
清除 DMA 通道 transmission completion 中断 状态。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:无
PWM
bflb_pwm_v2_init(dev, config)
初始化 PWM。
参数:
dev:设备句柄config:pointer to save PWM 配置
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_set_period(dev, period)
设置 PWM period to change PWM frequence. Frequcence(hz) = PWM source clock /div/period。
参数:
dev:设备句柄period:PWM period
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_get_duty(dev, ch, delta, period)
获取 PWM duty。
参数:
dev:设备句柄ch:通道 numberdelta:pointer to save delta of thresholdperiod:pointer to save period
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_channel_init(dev, ch, config)
配置 PWM 通道.
参数:
dev:设备句柄ch:通道 numberconfig:pointer to save PWM 通道 配置
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_channel_set_threshold(dev, ch, low_threhold, high_threhold)
设置 PWM dutycycle. Dutycycle(%) = (high_threhold - low_threhold)/period * 100%。
参数:
dev:设备句柄ch:通道 numberlow_threhold:PWM low threholdhigh_threhold:PWM high threhold
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_channel_positive_start(dev, ch)
启动 PWM positive output。
参数:
dev:设备句柄ch:通道 number
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_channel_negative_start(dev, ch)
启动 PWM negative output。
参数:
dev:设备句柄ch:通道 number
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_channel_positive_stop(dev, ch)
停止 PWM positive output。
参数:
dev:设备句柄ch:通道 number
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_channel_negative_stop(dev, ch)
停止 PWM negative output。
参数:
dev:设备句柄ch:通道 number
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_int_enable(dev, int_en, enable)
使能 PWM 中断。
参数:
dev:设备句柄int_en:中断 typeenable:true means enable, otherwise disable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_get_intstatus(dev)
获取 PWM 中断 状态。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:中断 状态, use @ref PWM_INTSTS
bflb_pwm_v2_int_clear(dev, int_clear)
清除 PWM 中断 状态。
参数:
dev:设备句柄int_clear:clear 值, 使用 PWM_INTCLR
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_pwm_v2_feature_control(dev, cmd, arg)
Control PWM feature.
参数:
dev:设备句柄cmd:feature command, 使用 PWM_CMDarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
硬件定时器
bflb_timer_init(dev, config)
初始化定时器。
参数:
dev:设备句柄config:pointer to save 定时器 配置
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_timer_set_preloadvalue(dev, val)
设置定时器 preload 值。
参数:
dev:设备句柄val:preload 值
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_timer_set_compvalue(dev, cmp_no, val)
设置 compare 值 of corresponding compare id。
参数:
dev:设备句柄cmp_no:compare id, 使用 TIMER_COMP_IDval:compare 值
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_timer_get_compvalue(dev, cmp_no)
获取 compare 值 of corresponding compare id。
参数:
dev:设备句柄cmp_no:compare id, 使用 TIMER_COMP_ID
📎 设备名速查:支持的设备名(BL616)
返回值:uint32_t
bflb_timer_compint_mask(dev, cmp_no, mask)
使能 or disable 定时器 中断 of corresponding compare id。
参数:
dev:设备句柄cmp_no:compare id, 使用 TIMER_COMP_IDmask:true means disable, false means enable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_timer_get_compint_status(dev, cmp_no)
获取定时器 中断 状态 of corresponding compare id。
参数:
dev:设备句柄cmp_no:compare id, 使用 TIMER_COMP_ID
📎 设备名速查:支持的设备名(BL616)
返回值:true mean yes, otherwise no.
bflb_timer_compint_clear(dev, cmp_no)
清除定时器 中断 状态 of corresponding compare id。
参数:
dev:设备句柄cmp_no:compare id, 使用 TIMER_COMP_ID
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_timer_feature_control(dev, cmd, arg)
Control 定时器 feature.
参数:
dev:设备句柄cmd:feature command, 使用 TIMER_CMDarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure.
bflb_timer_capture_init(dev, config)
初始化 the 定时器 capture feature。
参数:
dev:设备句柄config:pointer to the 定时器 capture 配置 structure
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_timer_capture_start(dev)
启动 the 定时器 capture process。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:0 on success, or a negative error code on failure.
bflb_timer_capture_stop(dev)
停止 the 定时器 capture process。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:0 on success, or a negative error code on failure.
bflb_timer_capture_get_latch_value(dev, gpio_lat)
获取 the captured latch values。
参数:
dev:设备句柄gpio_lat:pointer to the structure where the latch values will be stored.
📎 设备名速查:支持的设备名(BL616)
返回值:0 on success, or a negative error code on failure.
bflb_timer_capture_get_pulsewidth(gpio_lat)
Calculate the pulse width from the captured latch values.
参数:
gpio_lat:pointer to the structure containing the latch values.
返回值:The calculated pulse width, or 0 if the pulse width cannot be determined.
机器定时器 MTimer
bflb_mtimer_get_freq()
获取 mtimer current frequence。
返回值:frequence
bflb_mtimer_delay_ms(time)
Mtimer delay with ms.
参数:
time:delay time
返回值:无
bflb_mtimer_delay_us(time)
Mtimer delay with us.
参数:
time:delay time
返回值:无
bflb_mtimer_get_time_us()
获取 current mtimer time with us。
返回值:time with us
bflb_mtimer_get_time_ms()
获取 current mtimer time with ms。
返回值:time with ms
bflb_mtimer_set_val(val)
设置 the 值 of mtimer。
参数:
val:值 of mtimer
返回值:无
Flash
bflb_flash_init()
初始化 Flash。
返回值:Zero on success; a negated errno 值 on failure
bflb_flash_get_jedec_id()
获取 Flash jedec id。
返回值:uint32_t
bflb_flash_get_size()
get Flash size
返回值:Flash size
bflb_flash2_get_size()
get flash2 size
返回值:flash2 size
bflb_flash_get_cfg(cfg_addr, len)
获取 Flash 配置。
参数:
cfg_addr:pointer to save 配置len:Flash 配置 size
返回值:无
bflb_flash_set_iomode(iomode)
设置 Flash iomode。
参数:
iomode:Flash iomode, 使用 FLASH_IOMODE
返回值:无
bflb_flash_get_image_offset()
获取 Flash image offset。
返回值:Flash image offset
bflb_flash_resource_lock(timeout_ms)
获取 Flash/XIP 资源的独占访问(DMA/中断场景需配合使用)。
参数:
timeout_ms:maximum wait time in milliseconds, or
返回值:Zero on success; a negated errno 值 on failure
bflb_flash_resource_unlock()
释放 Flash/XIP 资源(须与 lock 成对调用)。
返回值:无
bflb_flash_erase(addr, len)
Erase Flash with sectors.
参数:
addr:地址len:长度
返回值:Zero on success; a negated errno 值 on failure
bflb_flash_write(addr, data, len)
写入数据 into Flash。
参数:
addr:Flash physical 地址data:pointer to 数据 缓冲区len:数据长度
返回值:Zero on success; a negated errno 值 on failure
bflb_flash_read(addr, data, len)
读取数据 from Flash。
参数:
addr:Flash physical 地址data:pointer to 数据 缓冲区len:数据长度
返回值:Zero on success; a negated errno 值 on failure
bflb_flash_get_unique_id(data, id_len)
read Flash unique id
参数:
data:数据id_len:参数说明见 SDK 头文件
返回值:int
bflb_flash_set_cache(cont_read, cache_enable, cache_way_disable, flash_offset)
配置 Flash 缓存.
参数:
cont_read:enable or not continuous read 模式.cache_enable:enable 缓存 or notcache_way_disable:ways of 缓存 to disableflash_offset:Flash image offset
返回值:Zero on success; a negated errno 值 on failure
bflb_flash_aes_init(config)
初始化 Flash aes controller。
参数:
config:pointer to Flash aes 配置.
返回值:无
bflb_flash_aes_enable()
使能 Flash decrypt with aes。
返回值:无
bflb_flash_aes_disable()
关闭 Flash decrypt with aes。
返回值:无
bflb_flash_jump_encrypted_app(index, flash_addr, len)
初始化 Flash jump to encrypted app。
参数:
index:region indexflash_addr:Flash physical 地址.len:firmware length.
返回值:无
bflb_flash_jump_app(flash_addr)
Jump to application in Flash.
参数:
flash_addr:Flash physical 地址.
返回值:无
RTC
bflb_rtc_set_time(dev, time)
设置 RTC alarming time。
参数:
dev:设备句柄time:alarming time, unit is (1/32768 s)
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_rtc_get_time(dev)
获取 RTC current time。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:current RTC running time
bflb_rtc_set_utc_time(time)
设置 current utc time。
参数:
time:tm handle
返回值:无
bflb_rtc_get_utc_time(time)
获取 current utc time。
参数:
time:tm handle
返回值:无
bflb_rtc_get_utc_timestamp()
获取 current utc timestamp(s)。
返回值:见 SDK 头文件
红外 IR
bflb_ir_tx_init(dev, config)
初始化红外 tx。
参数:
dev:设备句柄config:pointer to 红外 tx configure structure
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_ir_send(dev, data, length)
发送数据 in NEC/RC5/customize 模式。
参数:
dev:设备句柄data:数据 缓冲区 to sendlength:length of 数据 缓冲区
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_ir_swm_send(dev, data, length)
发送数据 in software 模式。
参数:
dev:设备句柄data:数据 数据 缓冲区 to sendlength:length of 数据 缓冲区
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_ir_tx_enable(dev, enable)
使能 or disable 红外 tx。
参数:
dev:设备句柄enable:enable or disable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_ir_txint_mask(dev, int_type, mask)
Mask or unmask 红外 tx 中断.
参数:
dev:设备句柄int_type:红外 tx 中断 type, 使用 IR_TX_INTENmask:mask or unmask
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_ir_link_txdma(dev, enable)
使能 or disable 红外 tx DMA 模式。
参数:
dev:设备句柄enable:enable or disable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_ir_get_txfifo_cnt(dev)
获取红外 tx fifo available count。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:红外 tx fifo available count
bflb_ir_rx_init(dev, config)
初始化红外 rx。
参数:
dev:设备句柄config:配置 pointer to 红外 rx configure structure
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_ir_receive(dev, data)
接收数据 in NEC/RC5/customize 模式。
参数:
dev:设备句柄data:数据 received
📎 设备名速查:支持的设备名(BL616)
返回值:Bit count of 数据 received
bflb_ir_swm_receive(dev, data, length)
接收数据 in software 模式。
参数:
dev:设备句柄data:数据 缓冲区 to receivelength:of 数据 缓冲区
📎 设备名速查:支持的设备名(BL616)
返回值:Length of 数据 received
bflb_ir_rx_enable(dev, enable)
使能 or disable 红外 rx。
参数:
dev:设备句柄enable:enable or disable
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_ir_get_rxfifo_cnt(dev)
获取红外 rx fifo available count。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:红外 rx fifo available count
bflb_ir_rxint_mask(dev, int_type, mask)
Mask 红外 rx 中断.
参数:
dev:设备句柄int_type:红外 rx 中断 type, 使用 IR_RX_INTENmask:mask or unmask
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_ir_feature_control(dev, cmd, arg)
Control 红外 feature.
参数:
dev:设备句柄cmd:feature commandarg:用户数据
📎 设备名速查:支持的设备名(BL616)
返回值:A negated errno 值 on failure
校验和 CKS
bflb_cks_set_endian(dev, endian)
设置 checksum bitorder。
参数:
dev:设备句柄endian:校验和 endian, 使用 CKS_ENDIAN
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_cks_compute(dev, data, length)
Compute 数据 with checksum.
参数:
dev:设备句柄data:input 数据 缓冲区length:数据长度
📎 设备名速查:支持的设备名(BL616)
返回值:checksum 值
eFuse
bflb_efuse_get_chipid(chipid)
eFuse read chipid
参数:
chipid:[8]: chip id 缓冲区
返回值:0 or -1
bflb_efuse_get_device_info(device_info)
eFuse read 设备 info
参数:
device_info:: 设备 info pointer
返回值:0 or -1
bflb_efuse_read_mac_address(slot, mac, reload)
eFuse read optional MAC 地址
参数:
slot:: MAC 地址 slotmac:[6]: MAC 地址 缓冲区reload:: Whether reload
返回值:0 or -1
bflb_efuse_is_mac_address_slot_empty(slot, reload)
Whether MAC 地址 slot is empty
参数:
slot:: MAC 地址 slotreload:: whether reload to check
返回值:0 for all slots full,1 for others
bflb_efuse_write_mac_address_opt(slot, mac, program)
eFuse write optional MAC 地址
参数:
slot:: MAC 地址 slotmac:[6]: MAC 地址 缓冲区program:: Whether program
返回值:0 or -1
bflb_efuse_read_mac_address_opt(slot, mac, reload)
eFuse read optional MAC 地址
参数:
slot:: MAC 地址 slotmac:[6]: MAC 地址 缓冲区reload:: Whether reload
返回值:0 or -1
bflb_efuse_get_adc_vref_trim(dev)
eFuse read ADC vref trim
参数:
dev:: ADC 设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:vref trim 值
bflb_efuse_get_adc_offset_trim(dev)
eFuse read ADC offset trim
参数:
dev:: ADC 设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:offset trim 值
bflb_efuse_get_adc_gain_trim(dev)
eFuse read ADC gain trim
参数:
dev:: ADC 设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:coe
bflb_efuse_get_adc_trim(None)
eFuse read ADC 校准参数
参数:
None:参数说明见 SDK 头文件
返回值:coe
bflb_efuse_get_adc_tsen_trim(None)
eFuse read ADC tsen trim
参数:
None:参数说明见 SDK 头文件
返回值:int
bflb_efuse_read_secure_boot(sign, aes)
eFuse read secure boot
参数:
sign:: sign typeaes:: aes type
返回值:None
bflb_efuse_enable_aes(aes_type, xts_mode)
eFuse write secure boot AES
参数:
aes_type:: aes typexts_mode:: xts type
返回值:0 for success
bflb_efuse_rw_lock_aes_key(aes_type, xts_mode)
eFuse write AES 密钥 lock
参数:
aes_type:: aes typexts_mode:: xts type
返回值:0 for success
bflb_efuse_rw_lock_dbg_key(rd_lock, wr_lock)
eFuse write dbg 密钥 lock
参数:
rd_lock:: read lockwr_lock:: write lock
返回值:0 for success
bflb_efuse_write_lock_pk_hash(pkhash_len)
eFuse write 公钥 哈希 lock
参数:
pkhash_len:: 公钥 length
返回值:0 for success
bflb_efuse_write_lock_usb_pid_vid(None)
eFuse write usb pid vid lock
参数:
None:参数说明见 SDK 头文件
返回值:0 for success
SDIO
单线输出 WO
bflb_wo_pin_init(dev, pin, mode)
初始化单线输出 引脚。
参数:
dev:设备句柄pin:assert this 引脚 to 单线输出mode:使用 WO_MODE
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_wo_init(dev, pin, mode)
初始化单线输出。
参数:
dev:设备句柄pin:assert this 引脚 to 单线输出mode:使用 WO_MODE
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_wo_set_clk_div(dev, pin, mode)
设置单线输出 clock divider. This API is only valid for BL616CL。
参数:
dev:设备句柄pin:assert this 引脚 to 单线输出mode:使用 WO_MODE
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_wo_get_fifo_available_cnt(dev)
获取 the count of available space in fifo。
参数:
dev:设备句柄
📎 设备名速查:支持的设备名(BL616)
返回值:the count of available space in fifo
bflb_wo_push_fifo(dev, data, len)
Put len count of 数据 on 单线输出.
参数:
dev:设备句柄data:pointer to save send 数据len:length to send
📎 设备名速查:支持的设备名(BL616)
返回值:count has been sent successfully.
bflb_wo_push_fifo_force(dev, data, len)
Put len count of 数据 on 单线输出.
参数:
dev:设备句柄data:pointer to save send 数据len:length to send
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_wo_int_mask(dev, int_type)
关闭 or mask 单线输出 中断。
参数:
dev:设备句柄int_type:mask 值, 使用 WO_INT
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_wo_int_unmask(dev, int_type)
使能 or unmask 单线输出 中断。
参数:
dev:设备句柄int_type:unmask 值, 使用 WO_INT
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_wo_int_clear(dev, int_type)
清除单线输出 中断 状态。
参数:
dev:设备句柄int_type:clear 值, 使用 WO_INT
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_wo_uart_init(dev, baudrate, pin)
初始化单线输出 UART。
参数:
dev:设备句柄baudrate:baudrate of UARTpin:引脚 assert to uart_tx
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_wo_uart_put(dev, ch)
Put a block of 数据 on 单线输出 UART. This is a poll api.
参数:
dev:设备句柄ch:char
📎 设备名速查:支持的设备名(BL616)
返回值:无
看门狗 WDG
bflb_wdg_init(dev, config)
初始化 watchdog。
参数:
dev:设备句柄config:pointer to save watchdog 配置
📎 设备名速查:支持的设备名(BL616)
返回值:无
bflb_wdg_set_countervalue(dev, counter)
设置 watchdog counter 值。
参数:
dev:设备句柄counter:值
📎 设备名速查:支持的设备名(BL616)
返回值:无
L1 缓存
bflb_l1c_icache_enable()
使能指令缓存(I-缓存)
返回值:无
bflb_l1c_icache_disable()
关闭指令缓存
返回值:无
bflb_l1c_icache_invalid_all()
使指令缓存全部失效
返回值:无
bflb_l1c_icache_invalid_range(addr, size)
使指令缓存指定地址范围失效
参数:
addr:地址size:大小
返回值:无
bflb_l1c_dcache_enable()
使能数据缓存(D-缓存)
返回值:无
bflb_l1c_dcache_disable()
回写并失效后关闭数据缓存
返回值:无
bflb_l1c_dcache_clean_all()
回写全部数据缓存到内存
返回值:无
bflb_l1c_dcache_invalidate_all()
使全部数据缓存失效
返回值:无
bflb_l1c_dcache_clean_invalidate_all()
回写并使全部数据缓存失效
返回值:无
bflb_l1c_dcache_clean_range(addr, size)
回写指定地址范围的数据缓存
参数:
addr:地址size:大小
返回值:无
bflb_l1c_dcache_invalidate_range(addr, size)
使指定地址范围的数据缓存失效
参数:
addr:地址size:大小
返回值:无
bflb_l1c_dcache_clean_invalidate_range(addr, size)
回写并使指定范围数据缓存失效
参数:
addr:地址size:大小
返回值:无
bflb_l1c_hit_count_get(addr, size)
读取缓存命中计数
参数:
addr:地址size:大小
返回值:无
bflb_l1c_miss_count_get(addr, size)
读取缓存未命中计数
参数:
addr:地址size:大小
返回值:见 SDK 头文件
bflb_l1c_cache_write_set(addr, size)
设置缓存写策略(写透/写回/写分配)
参数:
addr:地址size:大小
返回值:无
以太网 EMAC
bflb_emac_md_read(dev, phy_addr, reg_addr, data)
读取 PHY 管理接口(MDIO)寄存器
📎 设备名速查:支持的设备名(BL616)
返回值:见 SDK 头文件
bflb_emac_md_write(dev, phy_addr, reg_addr, data)
写入 PHY 管理接口(MDIO)寄存器
📎 设备名速查:支持的设备名(BL616)
返回值:见 SDK 头文件
遇到问题?
如有其他问题,请到统一的提问与讨论区:Ai-Thinker Discussions

