/*
 * @Date: 2025-06-19 12:29:23
 * @Author: mypx
 * @LastEditors: mypx mypx_coder@163.com
 * @LastEditTime: 2025-10-15 16:52:14
 * @FilePath: board_pm.h
 * @Description: 
 * Copyright (c) 2025 by mypx, All Rights Reserved.
 */
#ifndef __BSP_MISC_H__
#define __BSP_MISC_H__
#include "adc.h"
#include "main.h"
#include "rtthread.h"
#include "tim.h"
#include "user_config.h"
#include <stdbool.h>
#include <stdint.h>

int pm_board_init(void);

void bsp_system_led_toggle(void);

void bsp_system_led_on(void);
void bsp_system_led_off(void);

void bsp_error_led_on(void);
void bsp_error_led_off(void);
void bsp_error_led_toggle(void);

int bsp_i2c_write_bytes(uint16_t dev_addr, uint16_t reg, uint8_t *data, uint16_t size);
int bsp_i2c_read_bytes(uint16_t dev_addr, uint16_t reg, uint8_t *data, uint16_t size);

void bsp_uart_print_send(const uint8_t *data, uint16_t len);

void bsp_lcd_cmd_send(const uint8_t *data, uint16_t len);

float bsp_sampling_tim_get_freq(void);

#endif // __BOARD_H__
