Device driver long wave receiver with 77,5 kHz.  
More...
Device driver long wave receiver with 77,5 kHz. 
◆ dcf77_tick_cb_t
      
        
          | typedef void(* dcf77_tick_cb_t) (struct dcf77 *dev, void *arg) | 
        
      
 
Signature for tick callback. 
- Parameters
 - 
  
    | [in] | dev | device that triggered the alarm  | 
    | [in] | arg | optional argument to put the callback in the right context  | 
  
   
Definition at line 45 of file dcf77.h.
 
 
◆ anonymous enum
Possible return codes. 
| Enumerator | 
|---|
| DCF77_OK  | all good  
 | 
| DCF77_NOCSUM  | checksum error  
 | 
| DCF77_TIMEOUT  | communication timed out  
 | 
| DCF77_INIT_ERROR  | Initialization error.  
 | 
Definition at line 50 of file dcf77.h.
 
 
◆ dcf77_get_time()
      
        
          | int dcf77_get_time  | 
          ( | 
          dcf77_t *  | 
          dev,  | 
        
        
           | 
           | 
          struct tm *  | 
          time  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
get a new timestamp from the device. 
- Note
 - if reading fails or checksum is invalid, last_vaules will be unwritten
 
- Parameters
 - 
  
    | [in] | dev | device descriptor of a DCF device  | 
    | [in] | time | datastruct for timeinformation | 
  
   
- Return values
 - 
  
    | <tt>DCF77_OK</tt> | Success  | 
    | <tt>DCF77_NOCSUM</tt> | Checksum error  | 
  
   
 
 
◆ dcf77_init()
Initialize a new DCF77 device. 
- Parameters
 - 
  
    | [out] | dev | device descriptor of a DCF device  | 
    | [in] | params | configuration parameters | 
  
   
- Return values
 - 
  
    | <tt>DCF77_OK</tt> | Success  | 
    | <tt>DCF77_INIT_ERROR</tt> | Error in initialization  | 
  
   
 
 
◆ dcf77_set_tick_cb()
Set a tick callback for DCF77. 
The registered callback function will be called for every new minute.
- Parameters
 - 
  
    | [in] | dev | device descriptor of a DCF device  | 
    | [in] | cb | Callback executed when a new minute starts.  | 
    | [in] | arg | Argument passed to callback.  |