| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #pragma once
- #define SHARK_BOARD_SP600 1
- #define SHARK_BOARD_SP700 2
- #define SHARK_BOARD_SP600_15AH 3
- #define SHARK_BOARD_SP700_OLD_CS1180 1
- #define true TRUE
- #define false FALSE
- #ifdef CONFIG_BOARD_SP600
- #include "gd32f3x0.h"
- #define CONFIG_BOARD_TYPE SHARK_BOARD_SP600
- #elif defined(CONFIG_BOARD_SP700)
- #include "gd32f3x0.h"
- #define CONFIG_BOARD_TYPE SHARK_BOARD_SP700
- #elif defined(CONFIG_BOARD_SP600_15AH)
- #include "gd32f3x0.h"
- #define CONFIG_BOARD_TYPE SHARK_BOARD_SP600_15AH
- #else
- #error "Invalid Board"
- #endif
- #if (CONFIG_BOARD_TYPE==SHARK_BOARD_SP700)
- #define r_resistor 1.0f // 1ºÁÅ·
- #define MAX_HA (30.0f)
- #define MAX_SOFT_CURRENT (50)
- #define MAX_I2T (2500.0f * 8)
- #define UART_NUM 2
- #define CURRENT_BIGER 50000
- #define CURRENT_MID 40000
- #define CURRENT_NORMAL 30000
- #elif (CONFIG_BOARD_TYPE==SHARK_BOARD_SP600)
- #define r_resistor 2.0f
- #ifdef CONFIG_CAP_15AH
- #define MAX_HA (15.0f)
- #define CURRENT_BIGER 35000
- #define CURRENT_MID 20000
- #define CURRENT_NORMAL 15000
- #else
- #define MAX_HA (22.5f)
- #define CURRENT_BIGER 40000
- #define CURRENT_MID 30000
- #define CURRENT_NORMAL 20000
- #endif
- #define MAX_SOFT_CURRENT (25)
- #define MAX_I2T (900.0f * 8)
- #define UART_NUM 1
- #endif
- #define MIN_CURRENT_FOR_CS1180 (4000)
- #define SMALL_CURRENT_R (28.0f)
- #define CELLS_NUM 15
- #define PACK_TEMPS_NUM 4
- #define PCB_TEMP_INDEX 3
- #define GD32_ADC 0
- #define CS1180_ADC 1
- #define UART_TIMEOUT 3000
- #define CHARGER_DETECT_IRQ_CLEAR_TIMEOUT (UART_TIMEOUT + 2 * 1000)
- void bsp_init(void);
- void wdog_start(int timeout);
- void wdog_reload(void);
- int wdog_set_timeout(int timeout);
- void systick_close(void);
- void systick_open(void);
|