-
Notifications
You must be signed in to change notification settings - Fork 1
/
auxiliary.h
85 lines (73 loc) · 2.18 KB
/
auxiliary.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
* auxiliary.h
*
* Created on: Sep 14, 2017
* Author: Galen
*/
#ifndef AUXILIARY_H_
#define AUXILIARY_H_
#include <cyu3types.h>
/* I2C address for the LED. */
#define AUX_ADDR_WR 0x98
#define AUX_ADDR_RD 0x99
#define AUX_ADC_MIN_PER 0x0034
#define REG_SENSOR_CTRL 0x00
#define SENSOR_CTRL_CONFIG_ACK_bp 0
#define SENSOR_CTRL_CONFIG_ACK_bm ( 1 << SELF_SENSOR_CONFIG_ACK_bp )
#define SENSOR_CTRL_CONFIGURE_bp 1
#define SENSOR_CTRL_CONFIGURE_bm ( 1 << SENSOR_CTRL_CONFIGURE_bp )
#define SENSOR_CTRL_POWER_ACK_bp 6
#define SENSOR_CTRL_POWER_ACK_bm ( 1 << SELF_SENSOR_POWER_ACK_bp )
#define SENSOR_CTRL_POWER_bp 7
#define SENSOR_CTRL_POWER_bm ( 1 << SENSOR_CTRL_POWER_bp )
/* Function : SensorInit
Description : Initialize the EV76C541 sensor.
Parameters :
CyBool_t config_req - request configuration
CyBool_t power_req - request sensor power on
*/
extern CyU3PReturnStatus_t
SensorReadCtrlReg (
uint8_t *status
);
extern CyU3PReturnStatus_t
SensorConfigurePython480 (
CyBool_t config_req,
CyBool_t power_req);
/* Function : SensorCheckInit
Description : Read the status of the image sensor
Parameters : uint8_t* status - location to write status
*/
CyU3PReturnStatus_t
SensorCheckInit (
uint8_t *status
);
/*
Function : ScopeAdcStart
Description : Starting taking and transmitting ADC reads from scope
Parameters :
multiplex_req - true or false to multiplex.
adc_per - ADC period
*/
extern CyU3PReturnStatus_t
ScopeAdcStart (
CyBool_t multiplex_req,
uint16_t adc_per);
/*
Function : ScopeGetAdcPeriod
Description : Get period of ADC on scope
Parameters : uint16_t *period - location to return result
Returns : CyU3PReturnStatus_t - status of I2C transaction
*/
extern CyU3PReturnStatus_t
ScopeGetAdcPeriod (
uint16_t *period);
/*
Function : ScopeAdcStop
Description : Stop taking and transmitting ADC reads from scope
Parameters : None
*/
extern CyU3PReturnStatus_t
ScopeAdcStop (
void);
#endif /* AUXILIARY_H_ */