Nut/OS  5.0.5
API Reference
owibus.h File Reference
#include <cfg/arch.h>
#include <stdint.h>
#include "owibus_bbif.h"
#include "owibus_uartif.h"
Include dependency graph for owibus.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _NUTOWIBUS
 The OWIBUS structure. More...

Defines

#define OWI_READ_ROM   0x33
 One-Wire command codes for devices.
#define OWI_OVERDRIVE_SKIP_ROM   0x3c
 As OWI_SKIP_ROM, but with command phase in fast mode.
#define OWI_CONVERT_T   0x44
 DS18B20: Start conversion on selected device(s).
#define OWI_MATCH_ROM   0x55
 Qualify command to single device.
#define OWI_OVERDRIVE_MATCH_ROM   0x69
 As OWI_MATCH_ROM but with command phase in fast mode.
#define OWI_SKIP_ROM   0xCC
 Qualify command as broadcast.
#define OWI_READ   0xBE
 Read data from addressed device.
#define OWI_SEARCH_ROM   0xF0
 Prepare devices for ID search.
#define OWI_LAST_DEVICE   0x00
 Constanst used for OwiRomSearch.
#define OWI_SEARCH_FIRST   0xFF
 Start value for ID search.
#define OWI_OVERDRIVE   0x1
 OWI bus modes.
#define OWI_PULLUP   0x2
 Active pull-up for loaded buses.

Typedefs

typedef struct _NUTOWIBUS NUTOWIBUS

Enumerations

enum  OWI_ERRORS {
  OWI_SUCCESS = 0, OWI_PRESENCE_ERR = -1, OWI_INVALID_HW = -2, OWI_OUT_OF_MEM = -3,
  OWI_HW_ERROR = -4, OWI_DATA_ERROR = -5, OWI_NOT_IMPLEMENTED = -6
}
 OWI return codes. More...
enum  OWIBUS_MODE { OWI_MODE_NORMAL = 0, OWI_MODE_OVERDRIVE = 1, OWI_MODE_NONE = 2 }
 OWI speed modes. More...
enum  STM32_OWITIMER_COMMANDS { OWI_CMD_RESET = 0, OWI_CMD_RWBIT = 1, OWI_CMD_NONE = 2 }
 OWI transactions. More...
enum  STM32_OWITIMER_PHASES {
  OWI_PHASE_SETUP = 0, OWI_PHASE_SYNC_PULSE = 1, OWI_PHASE_RW = 2, OWI_PHASE_RELEASE = 3,
  OWI_PHASE_NONE = 4
}
 OWI transactions phases. More...

Functions

int OwiRomSearch (NUTOWIBUS *bus, uint8_t *diff, uint64_t *hid)
 Search the connected One-Wire bus for devices.
int OwiCommand (NUTOWIBUS *bus, uint8_t cmd, uint64_t *hid)
 Send a command to the connected devices.
int OwiReadBlock (NUTOWIBUS *bus, uint8_t *data, uint_fast8_t len)
 Read a block of data.
int OwiWriteBlock (NUTOWIBUS *bus, uint8_t *data, uint_fast8_t len)
 Write a block of data.
int OwiSetMode (NUTOWIBUS *bus, uint_fast8_t mode)
 Set/Reset One-Wire Mode(s)
int OwiGetMode (NUTOWIBUS *bus)