![]() |
MAX32665 Peripheral Driver API
Peripheral Driver API for the MAX32665
|
Modules | |
OWM_Registers | |
Data Structures | |
struct | mxc_owm_cfg_t |
Macros | |
#define | READ_ROM_COMMAND 0x33 |
#define | MATCH_ROM_COMMAND 0x55 |
#define | SEARCH_ROM_COMMAND 0xF0 |
#define | SKIP_ROM_COMMAND 0xCC |
#define | OD_SKIP_ROM_COMMAND 0x3C |
#define | OD_MATCH_ROM_COMMAND 0x69 |
#define | RESUME_COMMAND 0xA5 |
Enumerations | |
enum | mxc_owm_ext_pu_t |
Functions | |
int | MXC_OWM_Init (const mxc_owm_cfg_t *cfg, sys_map_t map) |
void | MXC_OWM_Shutdown (void) |
int | MXC_OWM_Reset (void) |
int | MXC_OWM_GetPresenceDetect (void) |
int | MXC_OWM_TouchByte (uint8_t data) |
int | MXC_OWM_WriteByte (uint8_t data) |
int | MXC_OWM_ReadByte (void) |
int | MXC_OWM_TouchBit (uint8_t bit) |
int | MXC_OWM_WriteBit (uint8_t bit) |
int | MXC_OWM_ReadBit (void) |
int | MXC_OWM_Write (uint8_t *data, int len) |
int | MXC_OWM_Read (uint8_t *data, int len) |
int | MXC_OWM_ReadROM (uint8_t *ROMCode) |
int | MXC_OWM_MatchROM (uint8_t *ROMCode) |
int | MXC_OWM_ODMatchROM (uint8_t *ROMCode) |
int | MXC_OWM_SkipROM (void) |
int | MXC_OWM_ODSkipROM (void) |
int | MXC_OWM_Resume (void) |
int | MXC_OWM_SearchROM (int newSearch, uint8_t *ROMCode) |
void | MXC_OWM_ClearFlags (uint32_t mask) |
unsigned | MXC_OWM_GetFlags (void) |
void | MXC_OWM_SetExtPullup (int enable) |
void | MXC_OWM_SetOverdrive (int enable) |
void | MXC_OWM_EnableInt (int flags) |
void | MXC_OWM_DisableInt (int flags) |
int | MXC_OWM_SetForcePresenceDetect (int enable) |
int | MXC_OWM_SetInternalPullup (int enable) |
int | MXC_OWM_SetExternalPullup (mxc_owm_ext_pu_t ext_pu_mode) |
int | MXC_OWM_SystemClockUpdated (void) |
int | MXC_OWM_SetSearchROMAccelerator (int enable) |
int | MXC_OWM_BitBang_Init (int initialState) |
int | MXC_OWM_BitBang_Read (void) |
int | MXC_OWM_BitBang_Write (int state) |
int | MXC_OWM_BitBang_Disable (void) |
struct mxc_owm_cfg_t |
Structure type for 1-Wire Master configuration.
Data Fields | |
uint8_t | int_pu_en |
mxc_owm_ext_pu_t | ext_pu_mode |
uint8_t | long_line_mode |
mxc_owm_ext_pu_t ext_pu_mode |
See mxc_owm_ext_pu_t.
uint8_t int_pu_en |
1 = internal pullup on.
uint8_t long_line_mode |
1 = long line mode enable.
#define MATCH_ROM_COMMAND 0x55 |
Match ROM Command
#define OD_MATCH_ROM_COMMAND 0x69 |
Overdrive Match ROM Command
#define OD_SKIP_ROM_COMMAND 0x3C |
Overdrive Skip ROM Command
#define READ_ROM_COMMAND 0x33 |
Read ROM Command
#define RESUME_COMMAND 0xA5 |
Resume Command
#define SEARCH_ROM_COMMAND 0xF0 |
Search ROM Command
#define SKIP_ROM_COMMAND 0xCC |
Skip ROM Command
enum mxc_owm_ext_pu_t |
int MXC_OWM_BitBang_Disable | ( | void | ) |
Disable Bit Bang mode.
int MXC_OWM_BitBang_Init | ( | int | initialState | ) |
Prepare OWM for bit bang mode.
initialState | Starting value of owm |
int MXC_OWM_BitBang_Read | ( | void | ) |
Read current value of wire.
int MXC_OWM_BitBang_Write | ( | int | state | ) |
Set value of wire.
state | Value to drive wire to |
void MXC_OWM_ClearFlags | ( | uint32_t | mask | ) |
Clear interrupt flags.
mask | Mask of interrupts to clear. |
void MXC_OWM_DisableInt | ( | int | flags | ) |
Disables interrupts.
flags | which owm interrupts to disable |
void MXC_OWM_EnableInt | ( | int | flags | ) |
Enables interrupts.
flags | which owm interrupts to enable |
unsigned MXC_OWM_GetFlags | ( | void | ) |
Get interrupt flags.
int MXC_OWM_GetPresenceDetect | ( | void | ) |
Get the presence pulse detect status.
int MXC_OWM_Init | ( | const mxc_owm_cfg_t * | cfg, |
sys_map_t | map | ||
) |
Initialize and enable OWM module.
cfg | Pointer to OWM configuration. |
map | MAP_A, MAP_B or MAP_C onewire pins select. Has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. |
int MXC_OWM_MatchROM | ( | uint8_t * | ROMCode | ) |
Starts 1-Wire communication with Match ROM command.
ROMCode | Pointer to buffer with ROM code to match |
int MXC_OWM_ODMatchROM | ( | uint8_t * | ROMCode | ) |
Starts 1-Wire communication with Overdrive Match ROM command.
ROMCode | Pointer to buffer with ROM code to match |
int MXC_OWM_ODSkipROM | ( | void | ) |
Starts 1-Wire communication with Overdrive Skip ROM command.
int MXC_OWM_Read | ( | uint8_t * | data, |
int | len | ||
) |
Read multiple bytes of data. Will block until transaction is complete.
data | Pointer to buffer for read data. |
len | Number of bytes to read. |
int MXC_OWM_ReadBit | ( | void | ) |
Read one bit of data. Will block until transaction is complete.
int MXC_OWM_ReadByte | ( | void | ) |
Read one byte of data. Will block until transaction is complete.
int MXC_OWM_ReadROM | ( | uint8_t * | ROMCode | ) |
Starts 1-Wire communication with Read ROM command.
ROMCode | Pointer to buffer for ROM code read |
int MXC_OWM_Reset | ( | void | ) |
Send 1-Wire reset pulse. Will block until transaction is complete.
int MXC_OWM_Resume | ( | void | ) |
Starts 1-Wire communication with Resume command.
int MXC_OWM_SearchROM | ( | int | newSearch, |
uint8_t * | ROMCode | ||
) |
Starts 1-Wire communication with Search ROM command.
newSearch | (1) = start new search, (0) = continue search for next ROM |
ROMCode | Pointer to buffer with ROM code found |
int MXC_OWM_SetExternalPullup | ( | mxc_owm_ext_pu_t | ext_pu_mode | ) |
Enables/Disables the External pullup.
ext_pu_mode | See mxc_owm_ext_pu_t for values |
void MXC_OWM_SetExtPullup | ( | int | enable | ) |
Enables/Disables the External pullup.
enable | (1) = enable, (0) = disable |
int MXC_OWM_SetForcePresenceDetect | ( | int | enable | ) |
Enables/Disables driving of OWM_IO low during presence detection.
enable | (1) = enable, (0) = disable |
int MXC_OWM_SetInternalPullup | ( | int | enable | ) |
Enables/Disables the Internal pullup.
enable | (1) = enable, (0) = disable |
void MXC_OWM_SetOverdrive | ( | int | enable | ) |
Enables/Disables Overdrive speed.
enable | (1) = overdrive, (0) = standard |
int MXC_OWM_SetSearchROMAccelerator | ( | int | enable | ) |
Enable/Disable Search ROM Accelerator mode.
enable | (1) = enable, (0) = disable |
int MXC_OWM_SkipROM | ( | void | ) |
Starts 1-Wire communication with Skip ROM command.
int MXC_OWM_SystemClockUpdated | ( | void | ) |
Call to correct divider if system clock has changed.
int MXC_OWM_TouchBit | ( | uint8_t | bit | ) |
Send and receive one bit of data. Will block until transaction is complete.
bit | bit to send |
int MXC_OWM_TouchByte | ( | uint8_t | data | ) |
Send and receive one byte of data. Will block until transaction is complete.
data | data to send |
int MXC_OWM_Write | ( | uint8_t * | data, |
int | len | ||
) |
Write multiple bytes of data. Will block until transaction is complete.
data | Pointer to buffer for write data. |
len | Number of bytes to write. |
int MXC_OWM_WriteBit | ( | uint8_t | bit | ) |
Write one bit of data. Will block until transaction is complete.
bit | bit to send |
int MXC_OWM_WriteByte | ( | uint8_t | data | ) |
Write one byte of data. Will block until transaction is complete.
data | data to send |