Ke Ao Teensy Flight Software
The software on the Teensy in the Ke Ao cubesat.
Loading...
Searching...
No Matches
Artemis::Devices::Astrodev::realtimeclock Struct Reference

Structure for radio Real-Time Clock (RTC) communication. More...

#include <astrodev.h>

Public Attributes

uint16_t year
 The year of a date.
 
uint8_t mon
 The month of a date.
 
uint8_t day
 The day of a date.
 
uint8_t dow
 The day of week of a date.
 
uint8_t hour
 The hour of a time.
 
uint8_t min
 The minute of a time.
 
uint8_t sec
 The second of a time.
 
uint8_t alarm_dow
 The alarm day of week.
 
uint8_t alarm_day
 The alarm day.
 
uint8_t alarm_hour
 The alarm hour.
 
uint8_t alarm_min
 The alarm minute.
 

Detailed Description

Structure for radio Real-Time Clock (RTC) communication.

This defines the structure of Astrodev Real-Time Clock (RTC) data. This stucture is sent as the payload of a packet to communicate radio RTC data between the radio and Teensy.

This struct consists of 11 members and is 12 bytes in size. These members are a date (year, mon, day, dow), a time (hour, min, sec), and an alarm (alarm_dow, alarm_day, alarm_hour, alarm_min).A diagram of the struct is included below.

  Bytes 0-3
 2 bytes  1 byte  1 byte
 +--------+-------+-------+
 |  year  |  mon  |  day  |
 +--------+-------+-------+

 Bytes 4-7
 1 byte  1 byte   1 byte  1 byte
 +-------+--------+-------+-------+
 |  dow  |  hour  |  min  |  sec  |
 +-------+--------+-------+-------+

 Bytes 8-11
 1 byte      1 byte      1 byte       1 byte
 +-----------+-----------+------------+-----------+
 | alarm_dow | alarm_day | alarm_hour | alarm_min |
 +-----------+-----------+------------+-----------+

Member Data Documentation

◆ alarm_day

uint8_t Artemis::Devices::Astrodev::realtimeclock::alarm_day

The alarm day.

A Binary-Coded Decimal (BCD) representation of the day for the Real-Time Clock (RTC) alarm. For example, 0x20 corresponds to the 20th day of the month.

◆ alarm_dow

uint8_t Artemis::Devices::Astrodev::realtimeclock::alarm_dow

The alarm day of week.

A Binary-Coded Decimal (BCD) representation of the day of week for the Real-Time Clock (RTC) alarm. For example, 0x02 corresponds to Tuesday.

◆ alarm_hour

uint8_t Artemis::Devices::Astrodev::realtimeclock::alarm_hour

The alarm hour.

A Binary-Coded Decimal (BCD) representation of the hour for the Real-Time Clock (RTC) alarm. For example, 0x09 corresponds to the 9th hour of the day.

◆ alarm_min

uint8_t Artemis::Devices::Astrodev::realtimeclock::alarm_min

The alarm minute.

A Binary-Coded Decimal (BCD) representation of the minute for the Real-Time Clock (RTC) alarm. For example, 0x30 corresponds to the 30th minute of the hour.

◆ day

uint8_t Artemis::Devices::Astrodev::realtimeclock::day

The day of a date.

A Binary-Coded Decimal (BCD) representation of the day. For example, 0x12 corresponds to the 12th day of the month.

◆ dow

uint8_t Artemis::Devices::Astrodev::realtimeclock::dow

The day of week of a date.

A Binary-Coded Decimal (BCD) representation of the day of week, starting from Sunday. For example, 0x05 corresponds to a Friday.

◆ hour

uint8_t Artemis::Devices::Astrodev::realtimeclock::hour

The hour of a time.

A Binary-Coded Decimal (BCD) representation of the hour. For example, 0x11 corresponds to the 11th hour.

◆ min

uint8_t Artemis::Devices::Astrodev::realtimeclock::min

The minute of a time.

A Binary-Coded Decimal (BCD) representation of the minute. For example, 0x59 corresponds to the 59th minute of the hour.

◆ mon

uint8_t Artemis::Devices::Astrodev::realtimeclock::mon

The month of a date.

A Binary-Coded Decimal (BCD) representation of the month. For example, 0x10 corresponds to the month of October.

◆ sec

uint8_t Artemis::Devices::Astrodev::realtimeclock::sec

The second of a time.

A Binary-Coded Decimal (BCD) representation of the second. For example, 0x30 corresponds to the 30th second of the minute.

◆ year

uint16_t Artemis::Devices::Astrodev::realtimeclock::year

The year of a date.

A Binary-Coded Decimal (BCD) representation of the year. For example, 0x2021 corresponds to the year 2021.


The documentation for this struct was generated from the following file: