Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
tmc6460.h File Reference

Public API for the TMC6460 FOC gate driver. More...

#include <zephyr/types.h>
#include <zephyr/device.h>
#include <zephyr/sys/util.h>

Go to the source code of this file.

Data Structures

struct  tmc6460_field
 Describes a bitfield within a TMC6460 register. More...

Functions

int tmc6460_write (const struct device *dev, uint16_t reg_addr, uint32_t reg_val)
 Write a value to a TMC6460 register.
int tmc6460_read (const struct device *dev, uint16_t reg_addr, uint32_t *reg_val)
 Read a value from a TMC6460 register.
int tmc6460_rtmi_stream_write (const struct device *dev, uint8_t rtmi_index, uint32_t value)
 Write a value to an RTMI streamed register slot (UART only).
int tmc6460_enable (const struct device *dev)
 Enable the TMC6460 gate driver.
int tmc6460_disable (const struct device *dev)
 Disable the TMC6460 gate driver.
int tmc6460_poll_flag (const struct device *dev, uint16_t reg_addr, uint32_t flag_mask, uint32_t poll_interval_ms, uint32_t timeout_ms)
 Poll a register until the given flag bits are set or a timeout.
static uint32_t tmc6460_field_update (uint32_t reg_val, struct tmc6460_field field, uint32_t field_val)
 Update a bitfield within a register value (in memory only).
static int tmc6460_field_write (const struct device *dev, struct tmc6460_field field, uint32_t field_val)
 Read-modify-write a bitfield on the device.

Detailed Description

Public API for the TMC6460 FOC gate driver.