PebbleOS v4.47.0-1362-gd278268fe
Loading...
Searching...
No Matches
RTC drivers

Interface for RTC drivers. More...

Data Structures

struct  pbl_rtc_ops
 RTC driver operations. More...
 
struct  pbl_rtc
 RTC. More...
 

Macros

#define PBL_RTC_INIT(sym, _name, _init, _parent, _ops)
 Initialize a struct pbl_rtc.
 

Detailed Description

Interface for RTC drivers.

A driver embeds a struct pbl_rtc in its instance, sets it up with PBL_RTC_INIT(), and implements the struct pbl_rtc_ops the class calls.


Data Structure Documentation

◆ pbl_rtc

struct pbl_rtc

RTC.

Data Fields
struct pbl_device dev Device.
const struct pbl_rtc_ops * ops Driver operations.

Macro Definition Documentation

◆ PBL_RTC_INIT

#define PBL_RTC_INIT (   sym,
  _name,
  _init,
  _parent,
  _ops 
)
Value:
{ \
.dev = PBL_DEVICE_INIT_CLASS(sym, _name, _init, _parent, &pbl_rtc_class), \
.ops = (_ops), \
}
#define PBL_DEVICE_INIT_CLASS(sym, _name, _init, _parent, _cls)
Initializer for the struct pbl_device of device instance sym, in class _cls.
Definition device.h:153

Initialize a struct pbl_rtc.

Parameters
symSymbol of the instance, with its state defined by PBL_DEVICE_STATE_DEFINE().
_nameDevice name.
_initInit function, or NULL.
_parentParent device, or NULL.
_opsDriver operations.