Files
microchip-application-bmd38…/pel.h
T
Roy_01 aaaa331bcb fix: 1.Measure OUT=L、Measure OUT=H是不同relay, Anode, Cathode 的訊號
2.更改dev mode指令:
0x60: 打pulse+設定阻值+ADC讀ouput_r1/r2/vo/vc/ve
0x61: 把ouput_r1/r2/vo/vc/ve 傳給 central
0xF0: pel io init
0xF1: start/stop testing output pin task
2024-05-24 13:37:31 +08:00

36 lines
877 B
C

#pragma once
#ifndef __PEL_H__
#define __PEL_H__
#include "app_config.h"
#include "elite_board.h"
#include "elite.h"
#define PEL_0P5R_MASK (0x01 << 0)
#define PEL_1P0R_MASK (0x01 << 1)
#define PEL_2P0R_MASK (0x01 << 2)
#define PEL_4P0R_MASK (0x01 << 3)
#define PEL_8P0R_MASK (0x01 << 4)
#define PEL_16P2R_MASK (0x01 << 5)
#define PEL_32P4R_MASK (0x01 << 6)
#define PEL_63P4R_MASK (0x01 << 7)
#define PEL_127R_MASK (0x01 << 8)
#define PEL_255R_MASK (0x01 << 9)
#define PEL_511R_MASK (0x01 << 10)
#define PEL_1000R_MASK (0x01 << 11)
typedef struct
{
int32_t output_r1;
int32_t output_r2;
int32_t output_vo;
int32_t output_vc;
int32_t output_ve;
} pel_output_t;
void pel_relays_set(uint32_t measure_out);
pel_output_t pel_smaple_and_convt_all(uint32_t measure_out, uint32_t load_mask);
const elite_instance_t *pel_init(void);
#endif // !__PEL_H__