BSPACM  20150113
Board Support Package for ARM Cortex-M Microcontrollers
Data Structures | Typedefs | Functions
onewire_.h File Reference

Implementation-specific support for onewire bus configurations on boards in the Nordic Semiconductor nRF51 device series. More...

Go to the source code of this file.

Data Structures

struct  sBSPACMonewireBus
 

Typedefs

typedef struct sBSPACMonewireBus sBSPACMonewireBus
 

Functions

hBSPACMonewireBus hBSPACMonewireConfigureBus (sBSPACMonewireBus *bp, int dq_pin, int pwr_pin)
 

Detailed Description

Implementation-specific support for onewire bus configurations on boards in the Nordic Semiconductor nRF51 device series.

Warning
This file is included generically by <bspacm/utility/onewire.h> and will not be interpreted correctly in other contexts.
Homepage
http://github.com/pabigot/bspacm

Typedef Documentation

nRF51 variant bus configuration for one-wire devices

Function Documentation

hBSPACMonewireBus hBSPACMonewireConfigureBus ( sBSPACMonewireBus bp,
int  dq_pin,
int  pwr_pin 
)

Configure the given bus structure for one-wire operation.

Parameters
bppointer to device-specific information identifying the 1-wire bus
dq_pinGPIO pin connected to device DQ signal. This must be an integer in the range 0..31.
pwr_pinGPIO pin used to turn on parasitic power. Assumed to be active high. Pass -1 to indicate that external power is being used.
Returns
the handle for the configured bus, or NULL if the parameters were invalid.