ESP Line Following Buggy
2nd Year Embedded System Project (Group 48 - 2023/24)
Loading...
Searching...
No Matches
ds2781.h
Go to the documentation of this file.
1#include "stdint.h"
2
3/* ***** net address commands ***** */
4#define READ_NETADDRESS 0x33
5#define SKIP_NETADDRESS 0xCC
6
7
8/* ***** function commands ***** */
9#define READ_DATA 0x69
10#define WRITE_DATA 0x6C
11#define COPY_DATA 0x48
12#define RECALL_DATA 0xB8
13#define LOCK_EEPROM 0x6A //DO NOT USE
14
15
16/* ***** function prototypes ***** */
17/* Function details can be found in the .c file */
18int ReadVoltage (void);
19uint16_t ReadCurrent (void);
20uint32_t ReadAccumulatedCurrent (void);
21void ResetAccumulatedCurrent (void);
22uint32_t ReadNetAddress (void);
23uint16_t ReadTemperature (void);
24uint8_t ReadCurrentOffset (void);
25void WriteCurrentOffset (uint8_t offset);
26void AdjustCurrentOffset (void);
27void UpdateControlRegister (uint8_t control);
28uint8_t ReadRAM (uint8_t addr);
29void WriteRAM (uint8_t byte, uint8_t addr);
30void CopyEEPROM (uint8_t addr);
31void RecallEEPROM (uint8_t addr);
32
void RecallEEPROM(uint8_t addr)
Definition ds2781.cpp:337
int ReadVoltage(void)
Definition ds2781.cpp:27
void UpdateControlRegister(uint8_t control)
Definition ds2781.cpp:247
void AdjustCurrentOffset(void)
Definition ds2781.cpp:210
uint32_t ReadNetAddress(void)
Definition ds2781.cpp:117
void WriteCurrentOffset(uint8_t offset)
Definition ds2781.cpp:189
void ResetAccumulatedCurrent(void)
Definition ds2781.cpp:97
uint32_t ReadAccumulatedCurrent(void)
Definition ds2781.cpp:73
uint8_t ReadRAM(uint8_t addr)
Definition ds2781.cpp:274
void WriteRAM(uint8_t byte, uint8_t addr)
Definition ds2781.cpp:296
void CopyEEPROM(uint8_t addr)
Definition ds2781.cpp:318
uint16_t ReadTemperature(void)
Definition ds2781.cpp:144
uint8_t ReadCurrentOffset(void)
Definition ds2781.cpp:167
uint16_t ReadCurrent(void)
Definition ds2781.cpp:50