COSA
An Object-Oriented Platform for Arduino Programming
FAT16::time_t Union Reference

#include <FAT16.hh>

Collaboration diagram for FAT16::time_t:
Collaboration graph

Public Member Functions

 time_t (uint16_t h, uint8_t m, uint8_t s)
 
 time_t (uint16_t now)
 
uint16_t HOURS ()
 
uint8_t MINUTES ()
 
uint8_t SECONDS ()
 
 operator uint16_t ()
 

Public Attributes

uint16_t as_uint16
 
struct {
   uint8_t   seconds:5
 
   uint8_t   minutes:6
 
   uint8_t   hours:5
 
}; 
 

Detailed Description

FAT Time Format. A FAT directory entry time stamp is a 16-bit field that has a granularity of 2 seconds. Here is the format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the 16-bit word).

Bits 0-4: 2-second count, valid value range 0-29 inclusive (0-58 seconds). Bits 5-10: Minutes, valid value range 0-59 inclusive. Bits 11-15: Hours, valid value range 0-23 inclusive.

The valid time range is from Midnight 00:00:00 to 23:59:58.

Definition at line 527 of file FAT16.hh.

Constructor & Destructor Documentation

FAT16::time_t::time_t ( uint16_t  h,
uint8_t  m,
uint8_t  s 
)
inline

Definition at line 534 of file FAT16.hh.

FAT16::time_t::time_t ( uint16_t  now)
inline

Definition at line 540 of file FAT16.hh.

Member Function Documentation

uint16_t FAT16::time_t::HOURS ( )
inline

Definition at line 541 of file FAT16.hh.

uint8_t FAT16::time_t::MINUTES ( )
inline

Definition at line 542 of file FAT16.hh.

FAT16::time_t::operator uint16_t ( )
inline

Definition at line 544 of file FAT16.hh.

uint8_t FAT16::time_t::SECONDS ( )
inline

Definition at line 543 of file FAT16.hh.

Member Data Documentation

struct { ... }
uint16_t FAT16::time_t::as_uint16

Definition at line 528 of file FAT16.hh.

uint8_t FAT16::time_t::hours

Definition at line 532 of file FAT16.hh.

uint8_t FAT16::time_t::minutes

Definition at line 531 of file FAT16.hh.

uint8_t FAT16::time_t::seconds

Definition at line 530 of file FAT16.hh.


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