You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
1.9 KiB

1 year ago
////////////////////////////////////////////////////////////////////////////
///@copyright Copyright (c) 2018, 传控科技 All rights reserved.
///-------------------------------------------------------------------------
/// @file bsp_drv.h
/// @brief bsp @ driver config
///-------------------------------------------------------------------------
/// @version 1.0
/// @author CC
/// @date 20220109
/// @note cc_AS_stc02
/*******************
app:
weight zero
:
-----------------------------
xxx.x
Layer4: send/show
write to buffer -->send
-----------------------------
weight = cal(adc32)
Layer3: app weight
tst_weight.adc32 = ts_adc_samples[0].out5;
线 line
-----------------------------
out3
out2
Layer2: asp asp_adc
out1 adc
-------------------------
void L0_ADS1231_readCH2(vtype ch,vU16 *d)
Layer1: bsp: bsp_cs1232 adc的采样
*******************/
//////////////////////////////////////////////////////////////////////////////
#ifndef _app_weightzero_H
#define _app_weightzero_H
#include "TTSS_task.h"
#include "c_lib.h"
#include "../bsp/bsp_config.h"
#include "msp_uart0.h"
#include "../bsp/bsp_cs1232.h"
/////水一般是18-19升,再加上桶,就是大约20公斤
/*******
^
|
| o
| |
| o |
- - | |
o | |
| | |
|____|_____|____________>
0 40 80
[0] [1] [2]
,adc在一定范围内
:0 40 80
0+-% 40+-% 80+-%
**/
typedef struct
{
TS_task task;
vS32 rough_weight;
vU32 zero_weight;
vU32 adc32;
vU32 t32a,t32b;
vU32 weight_dval;
/// ts_weight_sheet_ ws[3];
}TS_TASK_weight_zero;
extern TS_TASK_weight_zero tst_weight_zero;
void L3_task_weight_zero_init(void);
void L3_task_weight_zero_handler(TS_TASK_weight_zero *s);
#endif // #ifndef _APP_TASK_ADC_H