FOSSASAT-1B
pin_interface.h File Reference

This module controls access to the components connect to via pins. More...

#include "FossaSat1B.h"
Include dependency graph for pin_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void Pin_Interface_Set_Temp_Resolution (uint8_t sensorAddr, uint8_t res)
 This function sets the resolution of the TMP100. More...
 
float Pin_Interface_Read_Temperature (uint8_t sensorAddr)
 This function reads the TMP100's value from its wire address. More...
 
int8_t Pin_Interface_Read_Temperature_Internal ()
 This function reads the MCU's internal temperature. More...
 
float Pin_Interface_Read_Voltage (uint8_t pin)
 Read the voltage of a given pin. More...
 
void Pin_Interface_Watchdog_Heartbeat (bool manageBattery=false)
 This function toggles the signal to the watchdog and writes it to the pin. More...
 
void Pin_Interface_Watchdog_Restart ()
 Restarts the watchdog. More...
 

Detailed Description

This module controls access to the components connect to via pins.

Definition in file pin_interface.h.

Function Documentation

◆ Pin_Interface_Read_Temperature()

float Pin_Interface_Read_Temperature ( uint8_t  sensorAddr)

This function reads the TMP100's value from its wire address.

Test:

(ID PIN_INTERF_H_T1) (SEV 1) Make sure that all resolutions do not break the satellite.

(ID PIN_INTERF_H_T2) (SEV 1) Make sure this returns the correct value.

Parameters
sensorAddrWire address of the TMP100
Returns
float The temperature value in Degrees C at the specified resolution.

Definition at line 16 of file pin_interface.cpp.

◆ Pin_Interface_Read_Temperature_Internal()

int8_t Pin_Interface_Read_Temperature_Internal ( )

This function reads the MCU's internal temperature.

Test:

(ID PIN_INTERF_H_T3) (SEV 1) Make sure this does not break the satellite.

(ID PIN_INTERF_H_T4) (SEV 2) Make sure this returns the correct value.

Returns
int8_t The temperature returned by the MCU in Degrees C.

Definition at line 28 of file pin_interface.cpp.

◆ Pin_Interface_Read_Voltage()

float Pin_Interface_Read_Voltage ( uint8_t  pin)

Read the voltage of a given pin.

Test:
(ID PIN_INTERF_H_T5) (SEV 1) Make sure the given equation is correct for all compatable pins.
Parameters
pinThe pin to read from.
Returns
float The voltage.

Definition at line 43 of file pin_interface.cpp.

◆ Pin_Interface_Set_Temp_Resolution()

void Pin_Interface_Set_Temp_Resolution ( uint8_t  sensorAddr,
uint8_t  res 
)

This function sets the resolution of the TMP100.

Test:
(ID PIN_INTERF_H_T0) (SEV 1) Make sure that this does not break with the given resolutions.
Parameters
sensorAddrWire address of the TMP100.
resThe value that relates to the resolution property of the TMP100. See TMP100 Temperature Sensor Configuration

Definition at line 3 of file pin_interface.cpp.

◆ Pin_Interface_Watchdog_Heartbeat()

void Pin_Interface_Watchdog_Heartbeat ( bool  manageBattery = false)

This function toggles the signal to the watchdog and writes it to the pin.

Test:
(ID PIN_INTERF_H_T6) (SEV 1) Make sure this function keeps the satellite alive.
Parameters
manageBatteryWhether to perform battery and power management.

Definition at line 48 of file pin_interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Pin_Interface_Watchdog_Restart()

void Pin_Interface_Watchdog_Restart ( )

Restarts the watchdog.

Test:
(ID PIN_INTERF_H_T7) (SEV 1) Make sure this function resets the watchdog.

Definition at line 58 of file pin_interface.cpp.