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

Interface for crypto engine drivers. More...

Data Structures

struct  pbl_crypto_ops
 Crypto engine driver operations. More...
 
struct  pbl_crypto
 Crypto engine. More...
 

Macros

#define PBL_CRYPTO_STATE_DEFINE(sym)   PBL_DEVICE_STATE_DEFINE(sym)
 Define the class state of a crypto engine.
 
#define PBL_CRYPTO_INIT(sym, _name, _parent, _ops)
 Initialize a struct pbl_crypto.
 

Detailed Description

Interface for crypto engine drivers.

A driver embeds a struct pbl_crypto in its instance, sets it up with PBL_CRYPTO_STATE_DEFINE() and PBL_CRYPTO_INIT(), and implements the struct pbl_crypto_ops the class calls.


Data Structure Documentation

◆ pbl_crypto

struct pbl_crypto

Crypto engine.

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

Macro Definition Documentation

◆ PBL_CRYPTO_INIT

#define PBL_CRYPTO_INIT (   sym,
  _name,
  _parent,
  _ops 
)
Value:
{ \
.dev = PBL_DEVICE_INIT_CLASS(sym, _name, pbl_crypto_dev_init, _parent, &pbl_crypto_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_crypto.

Parameters
symSymbol of the instance, as passed to PBL_CRYPTO_STATE_DEFINE().
_nameDevice name.
_parentParent device, or NULL.
_opsDriver operations.

◆ PBL_CRYPTO_STATE_DEFINE

#define PBL_CRYPTO_STATE_DEFINE (   sym)    PBL_DEVICE_STATE_DEFINE(sym)

Define the class state of a crypto engine.

Parameters
symSymbol of the instance.