Download Zephyr Port Devices Driver



Configuration Options¶

Related configuration options:

A library of over 250,000 device drivers, firmware, BIOS and utilities for Windows. The rename of the driver needs to be complete within one commit, not split across two. The way the same device can be supported with two different bus interfaces can be done better by following existing examples, such as st,lis2dh or bosche,bme280.

API Reference¶

groupgpio_interface

GPIO Driver APIs.

Defines

GPIO_DECLARE_PIN_CONFIG_IDX(_idx)
GPIO_DECLARE_PIN_CONFIG
GPIO_PIN_IDX(_idx, _controller, _pin)
GPIO_PIN(_controller, _pin)
GPIO_GET_CONTROLLER_IDX(_idx, _conf)
GPIO_GET_PIN_IDX(_idx, _conf)
GPIO_GET_CONTROLLER(_conf)
GPIO_GET_PIN(_conf)

Typedefs

typedef gpio_callback_handler_t

Define the application callback handler function signature.

Note: cb pointer can be used to retrieve private data through

CONTAINER_OF() if original struct gpio_callback is stored in another private structure.
Parameters
  • structdevice*port: Device struct for the GPIO device.
  • structgpio_callback*cb: Original struct gpio_callback owning this handler
  • u32_tpins: Mask of pins that triggers the callback handler

Functions

static int gpio_pin_configure(structdevice *port, u32_t pin, int flags)

Configure a single pin.

Download
Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to device structure for the driver instance.
  • pin: Pin number to configure.
  • flags: Flags for pin configuration. IN/OUT, interrupt …
static int gpio_pin_write(structdevice *port, u32_t pin, u32_t value)

Write the data value to a single pin.

Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to the device structure for the driver instance.
  • pin: Pin number where the data is written.
  • value: Value set on the pin.
static int gpio_pin_read(structdevice *port, u32_t pin, u32_t *value)

Read the data value of a single pin.

Read the input state of a pin, returning the value 0 or 1.

Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to the device structure for the driver instance.
  • pin: Pin number where data is read.
  • value: Integer pointer to receive the data values from the pin.
static void gpio_init_callback(structgpio_callback *callback, gpio_callback_handler_thandler, u32_t pin_mask)

Helper to initialize a struct gpio_callback properly.

Parameters
  • callback: A valid Application’s callback structure pointer.
  • handler: A valid handler function pointer.
  • pin_mask: A bit mask of relevant pins for the handler
static int gpio_add_callback(structdevice *port, structgpio_callback *callback)

Add an application callback.

Note: enables to add as many callback as needed on the same port.

Return
0 if successful, negative errno code on failure.
Note
Callbacks may be added to the device from within a callback handler invocation, but whether they are invoked for the current GPIO event is not specified.
Parameters
  • port: Pointer to the device structure for the driver instance.
  • callback: A valid Application’s callback structure pointer.
static int gpio_remove_callback(structdevice *port, structgpio_callback *callback)

Remove an application callback.

Note: enables to remove as many callbacks as added through

gpio_add_callback().
Return
0 if successful, negative errno code on failure.
Warning
It is explicitly permitted, within a callback handler, to remove the registration for the callback that is running, i.e. callback. Attempts to remove other registrations on the same device may result in undefined behavior, including failure to invoke callbacks that remain registered and unintended invocation of removed callbacks.
Parameters
  • port: Pointer to the device structure for the driver instance.
  • callback: A valid application’s callback structure pointer.
static int gpio_pin_enable_callback(structdevice *port, u32_t pin)

Enable callback(s) for a single pin.

Note: Depending on the driver implementation, this function will enable the pin to trigger an interruption. So as a semantic detail, if no callback is registered, of course none will be called.

Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to the device structure for the driver instance.
  • pin: Pin number where the callback function is enabled.
static int gpio_pin_disable_callback(structdevice *port, u32_t pin)

Disable callback(s) for a single pin.

Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to the device structure for the driver instance.
  • pin: Pin number where the callback function is disabled.
static int gpio_port_configure(structdevice *port, int flags)

Configure all the pins the same way in the port. List out all flags on the detailed description.

Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to the device structure for the driver instance.
  • flags: Flags for the port configuration. IN/OUT, interrupt …
static int gpio_port_write(structdevice *port, u32_t value)

Write a data value to the port.

Write the output state of a port. The state of each pin is represented by one bit in the value. Pin 0 corresponds to the least significant bit, pin 31 corresponds to the most significant bit. For ports with less that 32 physical pins the most significant bits which do not correspond to a physical pin are ignored.

Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to the device structure for the driver instance.
  • value: Value to set on the port.
static int gpio_port_read(structdevice *port, u32_t *value)

Read data value from the port.

Read the input state of a port. The state of each pin is represented by one bit in the returned value. Pin 0 corresponds to the least significant bit, pin 31 corresponds to the most significant bit. Unused bits for ports with less that 32 physical pins are returned as 0.

Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to the device structure for the driver instance.
  • value: Integer pointer to receive the data value from the port.
static int gpio_port_enable_callback(structdevice *port)

Enable callback(s) for the port.

Note: Depending on the driver implementation, this function will enable the port to trigger an interruption on all pins, as long as these are configured properly. So as a semantic detail, if no callback is registered, of course none will be called.

Download Zephyr Port Devices Driver
Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to the device structure for the driver instance.
static int gpio_port_disable_callback(structdevice *port)

Disable callback(s) for the port.

Return
0 if successful, negative errno code on failure.
Parameters
  • port: Pointer to the device structure for the driver instance.
int gpio_get_pending_int(structdevice *dev)

Function to get pending interrupts.

The purpose of this function is to return the interrupt status register for the device. This is especially useful when waking up from low power states to check the wake up source.

Parameters
  • dev: Pointer to the device structure for the driver instance.
Return Value
  • status: != 0 if at least one gpio interrupt is pending.
  • 0: if no gpio interrupt is pending.
struct gpio_callback
#include <gpio.h>

GPIO callback structure.

Used to register a callback in the driver instance callback list. As many callbacks as needed can be added as long as each of them are unique pointers of struct gpio_callback. Beware such structure should not be allocated on stack.

Note: To help setting it, see gpio_init_callback() below

Download Zephyr Port Devices Driver Updater

-->

This article helps to fix an issue in which Windows 10 doesn't install specific drivers for USB audio devices on the first connection.

Original product version: Windows 10, version 1703
Original KB number: 4021854

Symptom

Download Zephyr Port Devices Driver Manual

When you connect a USB audio device to a Windows 10 Version 1703-based computer the first time, the operating system detects the device but loads the standard USB audio 2.0 driver (usbaudio2.sys) instead of the specific device driver.

Cause

This issue occurs because the USB audio 2.0 driver (usbaudio2.sys) isn't classified as a generic driver in Windows 10 Version 1703. Therefore, the system assumes that a compatible, nongeneric driver is installed for the device even though the driver is generic.

This issue also causes Windows 10 Version 1703 to postpone the search for other compatible drivers through Windows Update that typically occurs immediately after you install a new device.

Resolution

Download Zephyr Port Devices Driver Printer

To fix this issue, use one of the following methods.

Method 1

To resolve this issue, install update 4022716.

Method 2

If the device-specific driver is distributed through Windows Update, you can manually update the driver by using Device Manager. For more information about how to do this, see update drivers in Windows 10.

Win

Method 3

Download Zephyr Port Devices Driver Installer

If the device is not yet connected, first install the device-specific driver, such as by using the appropriate installer. After the device-specific driver is installed, Windows 10 will select that driver instead of the standard USB audio 2.0 driver when you first connect the device.

Note

See the device manufacturer's user guide for specific instructions about how to install the driver.

Download Zephyr Port Devices Driver

Method 4

If the driver isn't distributed through Windows Update, you can manually reinstall the driver. To do this, follow these steps:

Download Zephyr Port Devices Driver Win 7

  1. Install the device-specific driver (see Method 2).
  2. Open Device Manager.
  3. Right-click (or tap and hold) the name of the device, and then select Uninstall.
  4. Restart the computer.

When it restarts, Windows will try to reinstall the device by using the device-specific driver.