CardSight 0.1.0
C API reference for the CardSight firmware and application
Loading...
Searching...
No Matches
device.h File Reference

The tiny device model the mmc card and the block layer need: a name and a reference count. More...

#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  device
 Reference-counted object shared between the driver and its users. More...

Macros

#define DEVICE_NAME_MAX   32
 Longest device name, including the terminating zero.

Functions

void device_initialize (struct device *dev)
 Prepare a device structure: zero it and take the initial reference.
void get_device (struct device *dev)
 Take one more reference; NULL is ignored.

Detailed Description

The tiny device model the mmc card and the block layer need: a name and a reference count.

There is no bus, driver or class matching here; the platform knows its hardware.

Function Documentation

◆ device_initialize()

void device_initialize ( struct device * dev)

Prepare a device structure: zero it and take the initial reference.

Parameters
[out]devDevice to initialize; must point to writable storage.