forked from AeroZealous4/Wireless-control-of-home-appliances
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem.h
More file actions
44 lines (37 loc) · 1.14 KB
/
system.h
File metadata and controls
44 lines (37 loc) · 1.14 KB
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
/**
* \file system.h
* \ingroup WiControl
* \brief Fn prototypes for peripherals of tm4c123gh6pm uC.
*
* HAL: Hardware abstraction layer.
* Functions to initialize required peripherals of tm4c123gh6pm uC.
* \author Akshay Pampatwar
* \version 0.0
* \date 9th April 2020
*/
#ifndef SYSTEM_H_
#define SYSTEM_H_
//#include "commonheader.h"
#include <stdint.h>
///Initializes system with 20MHz CPU Clock and enable clk to all required ports
void Sys_Init(void);
/**
* Initializes GPIOs as an input for switches and Timer 0 to take care of debounce.
* @param debounce : Debounce Time setting for switches
*/
void Sys_GpipInit(uint32_t debounce);
///Init eeprom
void Sys_Eeprom_Init(void);
/**
* Returns content from eeprom corresponding to address passed to it.
* @param address: 0 to n | n belongs to Natural number
* @return Byte (int8_t): From addressed passed
*/
int8_t Sys_Restore_Byte(int8_t address);
/**
*Store passed contents to an eeprom.
* @param value: 8 bit data which needs to be stored
* @param address: 0 to n | n belongs to Natural number
*/
void Sys_Store_Byte(int8_t value, int8_t address);
#endif /* SYSTEM_H_ */