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.

Defines

#define MAX_RETRIES   3

Functions

int device_find (struct _reent *p_reent, uint8_t device_type)
void device_init (void)
int device_find_by_name (const char *p_name, int *p_len)

Variables

device_table_array_t device_table_list [DEVICE_MAX_DESCRIPTORS]

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

device_table_array_t device_table_list[DEVICE_MAX_DESCRIPTORS]
Initial value:
{
  { &thermo_device },
  { &accelero_device },
  
  { NULL },
  { NULL }
}

Definition at line 16 of file device.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Defines

Generated by  doxygen 1.6.2