core/newlib/device.c File Reference
#include "sceptre.h"
#include "device.h"
#include "thermo_device.h"
#include "accelero_device.h"
#include "sdcard_device.h"
#include <reent.h>
#include <errno.h>
#include <string.h>
Go to the source code of this file.
Detailed Description
Low-level device driver implementation.
Definition in file device.c.
Function Documentation
int device_find |
( |
struct _reent * |
p_reent, |
|
|
uint8_t |
device_type | |
|
) |
| | |
Search the device table for a device.
- Parameters:
-
| p_reent | Pointer to a structure that will receive the return value. |
| device_type | Device type to find. |
- Returns:
- Index of device on success, -1 if not found.
Definition at line 33 of file device.c.
int device_find_by_name |
( |
const char * |
p_name, |
|
|
int * |
p_len | |
|
) |
| | |
Search the device table for a device by name.
- Parameters:
-
| p_name | Pointer to the device name to find. |
| p_len | Length of the device name. |
- Returns:
- Index of device on success, -1 if not found.
Definition at line 86 of file device.c.
void device_init |
( |
void |
|
) |
|
Initialize the device table.
Definition at line 58 of file device.c.
Variable Documentation
Initial value:
Definition at line 16 of file device.c.