32 lines
493 B
C
32 lines
493 B
C
#ifndef BL0939_H__
|
|
#define BL0939_H__
|
|
|
|
|
|
|
|
// #include "main.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "esp_system.h"
|
|
#include "driver/spi_master.h"
|
|
#include "driver/gpio.h"
|
|
|
|
|
|
|
|
void bl0939_reset(void);
|
|
int bl0939_get_current_A(void);
|
|
int bl0939_get_current_B(void);
|
|
int bl0939_get_voltage(void);
|
|
|
|
//DMA
|
|
void bl0939_get_abv(uint8_t * buf);
|
|
int bl0939_parse_abv(uint8_t * buf,unsigned int * data);
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|