思澈科技软件开发工具包  2.20
PIN Exported Functions

Functions

void HAL_PIN_Select (int pad, int func, int hcpu)
 Select pin function only. More...
 
int HAL_PIN_Set (int pad, pin_function func, int flags, int hcpu)
 Set pin function. More...
 
int HAL_PIN_Set_Analog (int pad, int hcpu)
 Set pin for analog function, fix for ROM patch, avoid pin_const update. More...
 
int HAL_PIN_Update (int pad, uint32_t flags, uint32_t mask, int hcpu)
 Update pin flags. More...
 
int HAL_PIN_Get (int pad, pin_function *p_func, PIN_ModeTypeDef *p_mode, int hcpu)
 Get pin function. More...
 
int HAL_PIN_Set_DS0 (int pad, int hcpu, uint8_t set)
 Set pin DS0. More...
 
int HAL_PIN_Set_DS1 (int pad, int hcpu, uint8_t set)
 Set pin DS1. More...
 
int HAL_PIN_SetMode (int pad, int hcpu, PIN_ModeTypeDef mode)
 
void HAL_PIN_Set_Dual_flash1 (void)
 Set pinmux of dual mode of flash1.
 
void HAL_PIN_Set_Single_flash2 (void)
 Set pinmux of single mode of flash2.
 
void HAL_PIN_Set_Dual_flash2 (void)
 Set pinmux of dual mode of flash2.
 
void HAL_PIN_Set_Dual_flash1_default (void)
 Reset dual mode of flash1 to default configuration.
 
void HAL_PIN_Set_Single_flash2_default (void)
 Reset single mode of flash2 to default configuration.
 
void HAL_PIN_Set_Dual_flash2_default (void)
 Reset dual mode of flash2 to default configuration.
 
void HAL_PIN_SetFlash3 (void)
 Set pinmux for flash3.
 
void HAL_PIN_SetFlash4 (void)
 Set pinmux for flash4.
 
void HAL_PIN_SetFlash1_WithMode (int mode)
 Set pinmux for mpi1 with input mode.
 
void HAL_PIN_SetFlash2_WithMode (int mode)
 Set pinmux for mpi2 with input mode, for 58x, only HPSRAM and OPSRAM support.
 

Detailed Description

Function Documentation

◆ HAL_PIN_Get()

int HAL_PIN_Get ( int  pad,
pin_function p_func,
PIN_ModeTypeDef *  p_mode,
int  hcpu 
)

Get pin function.

Parameters
padphysical pin, refer pin_pad_hcpu and pin_pad_lcpu
p_funcPointer of variable to save pin function.
p_modePointer of varibale to save flag of the pin mode, see PIN_ModeTypeDef
hcpu1: pin for hcpu; 0: pin for lcpu
Return values
-1if invalid, else function idx(>= 0)

◆ HAL_PIN_Select()

void HAL_PIN_Select ( int  pad,
int  func,
int  hcpu 
)

Select pin function only.

Parameters
padphysical pin
funcPin function.
hcpu1: pin for hcpu; 0: pin for lcpu

◆ HAL_PIN_Set()

int HAL_PIN_Set ( int  pad,
pin_function  func,
int  flags,
int  hcpu 
)

Set pin function.

Parameters
padphysical pin, pin_pad_hcpu or pin_pad_lcpu
funcPin function.
flagsflag of the pin (pullup/pulldown), PIN pull flag
hcpu1: pin for hcpu; 0: pin for lcpu
Return values
-1if invalid, otherwise 0

◆ HAL_PIN_Set_Analog()

int HAL_PIN_Set_Analog ( int  pad,
int  hcpu 
)

Set pin for analog function, fix for ROM patch, avoid pin_const update.

Parameters
padphysical pin
hcpu1: pin for hcpu; 0: pin for lcpu
Return values
-1if invalid, otherwise 0

◆ HAL_PIN_Set_DS0()

int HAL_PIN_Set_DS0 ( int  pad,
int  hcpu,
uint8_t  set 
)

Set pin DS0.

Parameters
padphysical pin, pin_pad_hcpu or pin_pad_lcpu
hcpu1: pin for hcpu; 0: pin for lcpu
set1: select, 0: deselect
Return values
-1if invalid, otherwise 0

◆ HAL_PIN_Set_DS1()

int HAL_PIN_Set_DS1 ( int  pad,
int  hcpu,
uint8_t  set 
)

Set pin DS1.

Parameters
padphysical pin, refer pin_pad_hcpu and pin_pad_lcpu
hcpu1: pin for hcpu; 0: pin for lcpu
set1: select, 0: deselect
Return values
-1if invalid, otherwise 0

◆ HAL_PIN_Update()

int HAL_PIN_Update ( int  pad,
uint32_t  flags,
uint32_t  mask,
int  hcpu 
)

Update pin flags.

Parameters
padphysical pin
flagsFlags for the pin to update
maskMask of the flags
hcpu1: pin for hcpu; 0: pin for lcpu
Return values
-1if invalid, otherwise 0