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

#include <FAT16.hh>

Collaboration diagram for FAT16::date_t:
Collaboration graph

Public Member Functions

 date_t (uint16_t y, uint8_t m, uint8_t d)
 
 date_t (uint16_t date)
 
uint16_t YEAR ()
 
uint8_t MONTH ()
 
uint8_t DAY ()
 
 operator uint16_t ()
 

Public Attributes

uint16_t as_uint16
 
struct {
   uint8_t   day:5
 
   uint8_t   month:4
 
   uint8_t   year:7
 
}; 
 

Detailed Description

FAT date representation support Date Format. A FAT directory entry date stamp is a 16-bit field that is basically a date relative to the MS-DOS epoch of 01/01/1980. 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: Day of month, valid value range 1-31 inclusive. Bits 5-8: Month of year, 1 = January, valid value range 1-12 inclusive. Bits 9-15: Count of years from 1980, valid value range 0-127 inclusive (1980-2107).

Definition at line 491 of file FAT16.hh.

Constructor & Destructor Documentation

FAT16::date_t::date_t ( uint16_t  y,
uint8_t  m,
uint8_t  d 
)
inline

Definition at line 498 of file FAT16.hh.

FAT16::date_t::date_t ( uint16_t  date)
inline

Definition at line 504 of file FAT16.hh.

Member Function Documentation

uint8_t FAT16::date_t::DAY ( )
inline

Definition at line 507 of file FAT16.hh.

uint8_t FAT16::date_t::MONTH ( )
inline

Definition at line 506 of file FAT16.hh.

FAT16::date_t::operator uint16_t ( )
inline

Definition at line 508 of file FAT16.hh.

uint16_t FAT16::date_t::YEAR ( )
inline

Definition at line 505 of file FAT16.hh.

Member Data Documentation

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

Definition at line 492 of file FAT16.hh.

uint8_t FAT16::date_t::day

Definition at line 494 of file FAT16.hh.

uint8_t FAT16::date_t::month

Definition at line 495 of file FAT16.hh.

uint8_t FAT16::date_t::year

Definition at line 496 of file FAT16.hh.


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