R_set = current/2/0.000010f * R_out;
ad5245_set_res( R_set );
}
+
+static void __delay_us( uint32_t us )
+{
+ volatile int i;
+
+ for( i=0; i<us*1000; i++ )
+ ;
+}
+
+void lt3092_reset( void )
+{
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+
+ HAL_GPIO_WritePin( PB7_AA1_GPIO_Port, PB7_AA1_Pin, GPIO_PIN_RESET );
+
+ /*Configure output */
+ GPIO_InitStruct.Pin = PB7_AA1_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ HAL_GPIO_Init( PB7_AA1_GPIO_Port, &GPIO_InitStruct);
+
+ HAL_GPIO_WritePin( PB7_AA1_GPIO_Port, PB7_AA1_Pin, GPIO_PIN_SET );
+ __delay_us(1);
+ HAL_GPIO_WritePin( PB7_AA1_GPIO_Port, PB7_AA1_Pin, GPIO_PIN_RESET );
+
+ /*Configure input */
+ GPIO_InitStruct.Pin = PB7_AA1_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ HAL_GPIO_Init( PB7_AA1_GPIO_Port, &GPIO_InitStruct);
+}