PebbleOS v4.47.0-160-g9e782207f
Loading...
Searching...
No Matches
pbl_hyperbus_ops Struct Reference

Driver operations. More...

#include <hyperbus.h>

Data Fields

int(* enable )(const struct pbl_hyperbus *bus)
 Ungate the controller.
 
void(* disable )(const struct pbl_hyperbus *bus)
 Gate the controller.
 
int(* get_rate )(const struct pbl_hyperbus *bus, uint32_t *rate_hz)
 Get the bus clock rate, in Hz.
 
int(* configure )(const struct pbl_hyperbus *bus, const struct pbl_hyperbus_config *cfg, uintptr_t *base)
 Set the bus up for the memory, calibrating it if the controller needs to, and map the memory.
 
int(* read_reg )(const struct pbl_hyperbus *bus, uint32_t addr, uint16_t *val)
 Read a register.
 
int(* write_reg )(const struct pbl_hyperbus *bus, uint32_t addr, uint16_t val)
 Write a register.
 
int(* wake )(const struct pbl_hyperbus *bus)
 Pulse CS, which wakes a sleeping memory up.
 

Detailed Description

Driver operations.

Field Documentation

◆ configure

int(* pbl_hyperbus_ops::configure) (const struct pbl_hyperbus *bus, const struct pbl_hyperbus_config *cfg, uintptr_t *base)

Set the bus up for the memory, calibrating it if the controller needs to, and map the memory.

Returns its CPU address in base, or a negative errno.

Referenced by pbl_hyperbus_configure().

◆ disable

void(* pbl_hyperbus_ops::disable) (const struct pbl_hyperbus *bus)

Gate the controller.

Callable with interrupts disabled.

Referenced by pbl_hyperbus_disable().

◆ enable

int(* pbl_hyperbus_ops::enable) (const struct pbl_hyperbus *bus)

Ungate the controller.

Returns 0 or a negative errno.

Referenced by pbl_hyperbus_enable().

◆ get_rate

int(* pbl_hyperbus_ops::get_rate) (const struct pbl_hyperbus *bus, uint32_t *rate_hz)

Get the bus clock rate, in Hz.

Returns 0 or a negative errno.

Referenced by pbl_hyperbus_get_rate().

◆ read_reg

int(* pbl_hyperbus_ops::read_reg) (const struct pbl_hyperbus *bus, uint32_t addr, uint16_t *val)

Read a register.

Callable with interrupts disabled. Returns 0 or a negative errno.

Referenced by pbl_hyperbus_read_reg().

◆ wake

int(* pbl_hyperbus_ops::wake) (const struct pbl_hyperbus *bus)

Pulse CS, which wakes a sleeping memory up.

Callable with interrupts disabled. Returns 0 or a negative errno.

Referenced by pbl_hyperbus_wake().

◆ write_reg

int(* pbl_hyperbus_ops::write_reg) (const struct pbl_hyperbus *bus, uint32_t addr, uint16_t val)

Write a register.

Callable with interrupts disabled. Returns 0 or a negative errno.

Referenced by pbl_hyperbus_write_reg().


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