WB32L003 Standard Peripherals Firmware Library
结构体 | 宏定义 | 函数
wb32l003_owire.h 文件参考

This file contains all the functions prototypes for the OWIRE firmware library. 更多...

#include "wb32l003.h"

浏览源代码.

结构体

struct  OWIRE_InitTypeDef
 OWIRE Init Structure definition 更多...
 

宏定义

#define OWIRE_DATASIZE_1BIT   0x00000000U
 
#define OWIRE_DATASIZE_8BIT   OWIRE_CR_SIZE_Msk
 
#define OWIRE_FIRSTBIT_LSB   0x00000000U
 
#define OWIRE_FIRSTBIT_MSB   OWIRE_CR_MSBFIRST_Msk
 
#define OWIRE_CLOCK_DIVIDER_1   0x00000000U
 
#define OWIRE_CLOCK_DIVIDER_2   (0x1U << OWIRE_CR_CLKDIV_Pos)
 
#define OWIRE_CLOCK_DIVIDER_4   (0x2U << OWIRE_CR_CLKDIV_Pos)
 
#define OWIRE_CLOCK_DIVIDER_16   (0x3U << OWIRE_CR_CLKDIV_Pos)
 
#define OWIRE_RDMODE_0   0x00000000U
 
#define OWIRE_RDMODE_1   OWIRE_CR_RDMODE_Msk
 
#define OWIRE_NOISE_FILTER_CLK_DIV_1   0x00000000U
 
#define OWIRE_NOISE_FILTER_CLK_DIV_2   (0x1U << OWIRE_NFCR_NFDIV_Pos)
 
#define OWIRE_NOISE_FILTER_CLK_DIV_4   (0x2U << OWIRE_NFCR_NFDIV_Pos)
 
#define OWIRE_NOISE_FILTER_CLK_DIV_8   (0x3U << OWIRE_NFCR_NFDIV_Pos)
 
#define OWIRE_NOISE_FILTER_ENABLE   (0x1U << OWIRE_NFCR_NFEN_Pos)
 
#define OWIRE_NOISE_FILTER_DISABLE   0x00000000U
 
#define OWIRE_COMMAND_INIT   (0x1U << OWIRE_CMD_CMD_Pos)
 
#define OWIRE_COMMAND_TX   (0x2U << OWIRE_CMD_CMD_Pos)
 
#define OWIRE_COMMAND_RX   (0x3U << OWIRE_CMD_CMD_Pos)
 
#define OWIRE_FLAG_ACKERROR   ((uint32_t)OWIRE_SR_ACKERR_Msk)
 
#define OWIRE_FLAG_INITDONE   ((uint32_t)OWIRE_SR_INITDONE_Msk)
 
#define OWIRE_FLAG_TXDONE   ((uint32_t)OWIRE_SR_TXDONE_Msk)
 
#define OWIRE_FLAG_RXDONE   ((uint32_t)OWIRE_SR_RXDONE_Msk)
 
#define OWIRE_IT_ACKERROR   ((uint32_t)OWIRE_INTEN_ACKERREN_Msk)
 
#define OWIRE_IT_INIT   ((uint32_t)OWIRE_INTEN_INITEN_Msk)
 
#define OWIRE_IT_TXDONE   ((uint32_t)OWIRE_INTEN_TXDONEEN_Msk)
 
#define OWIRE_IT_RXDONE   ((uint32_t)OWIRE_INTEN_RXDONEEN_Msk)
 

函数

void OWIRE_DeInit (void)
 Deinitializes the OWIRE peripheral registers to their default reset values. 更多...
 
void OWIRE_Init (OWIRE_InitTypeDef *OWIRE_InitStruct)
 Initializes the OWIRE mode according to the specified parameters in the OWIRE_InitTypeDef and create the associated handler. 更多...
 
void OWIRE_Cmd (FunctionalState NewState)
 Enables or disables the specified OWIRE peripheral. 更多...
 
void OWIRE_ITConfig (uint32_t OWIRE_IT, FunctionalState NewState)
 Enables or disables the specified OWIRE interrupts. 更多...
 
uint8_t OWIRE_ReadData (void)
 Read one data from DATA register. 更多...
 
void OWIRE_WriteData (uint8_t Data)
 Write one data to DATA register. 更多...
 
void OWIRE_WriteCommand (uint8_t Command)
 Write command to CMD register. 更多...
 
FlagStatus OWIRE_GetFlagStatus (uint32_t OWIRE_FLAG)
 Checks whether the specified the OWIRE flag is set or not. 更多...
 
void OWIRE_ClearFlag (uint32_t OWIRE_FLAG)
 Clears the OWIRE's pending flags. 更多...
 
ITStatus OWIRE_GetITStatus (uint32_t OWIRE_IT)
 Checks whether the OWIRE interrupt has occurred or not. 更多...
 
void OWIRE_ClearITPendingBit (uint32_t OWIRE_IT)
 Clears the OWIRE's interrupt pending bits. 更多...
 

详细描述

This file contains all the functions prototypes for the OWIRE firmware library.

作者
Westberry Application Team
版本
V0.0.4
日期
23-April-2023