← back to dechros__tdf8546Library

Function bodies 30 total

All specs Real LLM only Function bodies
main function · c · L69-L110 (42 LOC)
Src/main.c
int main(void)
{
  /* USER CODE BEGIN 1 */

  /* USER CODE END 1 */

  /* MCU Configuration--------------------------------------------------------*/

  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* USER CODE BEGIN Init */

  /* USER CODE END Init */

  /* Configure the system clock */
  SystemClock_Config();

  /* USER CODE BEGIN SysInit */

  /* USER CODE END SysInit */

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_USART2_UART_Init();
  MX_I2C1_Init();
  /* USER CODE BEGIN 2 */
  
  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */
    int a = tdf8546_init();
    int b = tdf8546_mute();
    int c = tdf8546_unmute();
    /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */
}
SystemClock_Config function · c · L116-L154 (39 LOC)
Src/main.c
void SystemClock_Config(void)
{
  RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};

  /** Configure the main internal regulator output voltage
  */
  __HAL_RCC_PWR_CLK_ENABLE();
  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
  /** Initializes the RCC Oscillators according to the specified parameters
  * in the RCC_OscInitTypeDef structure.
  */
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
  RCC_OscInitStruct.HSIState = RCC_HSI_ON;
  RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
  RCC_OscInitStruct.PLL.PLLM = 16;
  RCC_OscInitStruct.PLL.PLLN = 336;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
  RCC_OscInitStruct.PLL.PLLQ = 7;
  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  {
    Error_Handler();
  }
  /** Initializes the CPU, AHB and APB buses clocks
  */
  RCC_ClkInitStruct.ClockT
MX_I2C1_Init function · c · L161-L188 (28 LOC)
Src/main.c
static void MX_I2C1_Init(void)
{

  /* USER CODE BEGIN I2C1_Init 0 */

  /* USER CODE END I2C1_Init 0 */

  /* USER CODE BEGIN I2C1_Init 1 */

  /* USER CODE END I2C1_Init 1 */
  hi2c1.Instance = I2C1;
  hi2c1.Init.ClockSpeed = 400000;
  hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
  hi2c1.Init.OwnAddress1 = 0;
  hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
  hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
  hi2c1.Init.OwnAddress2 = 0;
  hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
  hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
  if (HAL_I2C_Init(&hi2c1) != HAL_OK)
  {
    Error_Handler();
  }
  /* USER CODE BEGIN I2C1_Init 2 */

  /* USER CODE END I2C1_Init 2 */

}
MX_USART2_UART_Init function · c · L195-L221 (27 LOC)
Src/main.c
static void MX_USART2_UART_Init(void)
{

  /* USER CODE BEGIN USART2_Init 0 */

  /* USER CODE END USART2_Init 0 */

  /* USER CODE BEGIN USART2_Init 1 */

  /* USER CODE END USART2_Init 1 */
  huart2.Instance = USART2;
  huart2.Init.BaudRate = 115200;
  huart2.Init.WordLength = UART_WORDLENGTH_8B;
  huart2.Init.StopBits = UART_STOPBITS_1;
  huart2.Init.Parity = UART_PARITY_NONE;
  huart2.Init.Mode = UART_MODE_TX_RX;
  huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  huart2.Init.OverSampling = UART_OVERSAMPLING_16;
  if (HAL_UART_Init(&huart2) != HAL_OK)
  {
    Error_Handler();
  }
  /* USER CODE BEGIN USART2_Init 2 */

  /* USER CODE END USART2_Init 2 */

}
MX_GPIO_Init function · c · L228-L254 (27 LOC)
Src/main.c
static void MX_GPIO_Init(void)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};

  /* GPIO Ports Clock Enable */
  __HAL_RCC_GPIOC_CLK_ENABLE();
  __HAL_RCC_GPIOH_CLK_ENABLE();
  __HAL_RCC_GPIOA_CLK_ENABLE();
  __HAL_RCC_GPIOB_CLK_ENABLE();

  /*Configure GPIO pin Output Level */
  HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET);

  /*Configure GPIO pin : B1_Pin */
  GPIO_InitStruct.Pin = B1_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);

  /*Configure GPIO pin : LD2_Pin */
  GPIO_InitStruct.Pin = LD2_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct);

}
Error_Handler function · c · L264-L273 (10 LOC)
Src/main.c
void Error_Handler(void)
{
  /* USER CODE BEGIN Error_Handler_Debug */
  /* User can add his own implementation to report the HAL error return state */
  __disable_irq();
  while (1)
  {
  }
  /* USER CODE END Error_Handler_Debug */
}
assert_failed function · c · L283-L289 (7 LOC)
Src/main.c
void assert_failed(uint8_t *file, uint32_t line)
{
  /* USER CODE BEGIN 6 */
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
  /* USER CODE END 6 */
}
Provenance: Repobility (https://repobility.com) — every score reproducible from /scan/
HAL_MspInit function · c · L64-L80 (17 LOC)
Src/stm32f4xx_hal_msp.c
void HAL_MspInit(void)
{
  /* USER CODE BEGIN MspInit 0 */

  /* USER CODE END MspInit 0 */

  __HAL_RCC_SYSCFG_CLK_ENABLE();
  __HAL_RCC_PWR_CLK_ENABLE();

  HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);

  /* System interrupt init*/

  /* USER CODE BEGIN MspInit 1 */

  /* USER CODE END MspInit 1 */
}
HAL_I2C_MspInit function · c · L88-L116 (29 LOC)
Src/stm32f4xx_hal_msp.c
void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};
  if(hi2c->Instance==I2C1)
  {
  /* USER CODE BEGIN I2C1_MspInit 0 */

  /* USER CODE END I2C1_MspInit 0 */

    __HAL_RCC_GPIOB_CLK_ENABLE();
    /**I2C1 GPIO Configuration
    PB6     ------> I2C1_SCL
    PB7     ------> I2C1_SDA
    */
    GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
    GPIO_InitStruct.Pull = GPIO_PULLUP;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
    GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

    /* Peripheral clock enable */
    __HAL_RCC_I2C1_CLK_ENABLE();
  /* USER CODE BEGIN I2C1_MspInit 1 */

  /* USER CODE END I2C1_MspInit 1 */
  }

}
HAL_I2C_MspDeInit function · c · L124-L147 (24 LOC)
Src/stm32f4xx_hal_msp.c
void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
{
  if(hi2c->Instance==I2C1)
  {
  /* USER CODE BEGIN I2C1_MspDeInit 0 */

  /* USER CODE END I2C1_MspDeInit 0 */
    /* Peripheral clock disable */
    __HAL_RCC_I2C1_CLK_DISABLE();

    /**I2C1 GPIO Configuration
    PB6     ------> I2C1_SCL
    PB7     ------> I2C1_SDA
    */
    HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6);

    HAL_GPIO_DeInit(GPIOB, GPIO_PIN_7);

  /* USER CODE BEGIN I2C1_MspDeInit 1 */

  /* USER CODE END I2C1_MspDeInit 1 */
  }

}
HAL_UART_MspInit function · c · L155-L183 (29 LOC)
Src/stm32f4xx_hal_msp.c
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};
  if(huart->Instance==USART2)
  {
  /* USER CODE BEGIN USART2_MspInit 0 */

  /* USER CODE END USART2_MspInit 0 */
    /* Peripheral clock enable */
    __HAL_RCC_USART2_CLK_ENABLE();

    __HAL_RCC_GPIOA_CLK_ENABLE();
    /**USART2 GPIO Configuration
    PA2     ------> USART2_TX
    PA3     ------> USART2_RX
    */
    GPIO_InitStruct.Pin = USART_TX_Pin|USART_RX_Pin;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
    GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

  /* USER CODE BEGIN USART2_MspInit 1 */

  /* USER CODE END USART2_MspInit 1 */
  }

}
HAL_UART_MspDeInit function · c · L191-L212 (22 LOC)
Src/stm32f4xx_hal_msp.c
void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
{
  if(huart->Instance==USART2)
  {
  /* USER CODE BEGIN USART2_MspDeInit 0 */

  /* USER CODE END USART2_MspDeInit 0 */
    /* Peripheral clock disable */
    __HAL_RCC_USART2_CLK_DISABLE();

    /**USART2 GPIO Configuration
    PA2     ------> USART2_TX
    PA3     ------> USART2_RX
    */
    HAL_GPIO_DeInit(GPIOA, USART_TX_Pin|USART_RX_Pin);

  /* USER CODE BEGIN USART2_MspDeInit 1 */

  /* USER CODE END USART2_MspDeInit 1 */
  }

}
NMI_Handler function · c · L70-L80 (11 LOC)
Src/stm32f4xx_it.c
void NMI_Handler(void)
{
  /* USER CODE BEGIN NonMaskableInt_IRQn 0 */

  /* USER CODE END NonMaskableInt_IRQn 0 */
  /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  while (1)
  {
  }
  /* USER CODE END NonMaskableInt_IRQn 1 */
}
HardFault_Handler function · c · L85-L95 (11 LOC)
Src/stm32f4xx_it.c
void HardFault_Handler(void)
{
  /* USER CODE BEGIN HardFault_IRQn 0 */

  /* USER CODE END HardFault_IRQn 0 */
  while (1)
  {
    /* USER CODE BEGIN W1_HardFault_IRQn 0 */
    /* USER CODE END W1_HardFault_IRQn 0 */
  }
}
MemManage_Handler function · c · L100-L110 (11 LOC)
Src/stm32f4xx_it.c
void MemManage_Handler(void)
{
  /* USER CODE BEGIN MemoryManagement_IRQn 0 */

  /* USER CODE END MemoryManagement_IRQn 0 */
  while (1)
  {
    /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
    /* USER CODE END W1_MemoryManagement_IRQn 0 */
  }
}
Repobility · open methodology · https://repobility.com/research/
BusFault_Handler function · c · L115-L125 (11 LOC)
Src/stm32f4xx_it.c
void BusFault_Handler(void)
{
  /* USER CODE BEGIN BusFault_IRQn 0 */

  /* USER CODE END BusFault_IRQn 0 */
  while (1)
  {
    /* USER CODE BEGIN W1_BusFault_IRQn 0 */
    /* USER CODE END W1_BusFault_IRQn 0 */
  }
}
UsageFault_Handler function · c · L130-L140 (11 LOC)
Src/stm32f4xx_it.c
void UsageFault_Handler(void)
{
  /* USER CODE BEGIN UsageFault_IRQn 0 */

  /* USER CODE END UsageFault_IRQn 0 */
  while (1)
  {
    /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
    /* USER CODE END W1_UsageFault_IRQn 0 */
  }
}
SVC_Handler function · c · L145-L153 (9 LOC)
Src/stm32f4xx_it.c
void SVC_Handler(void)
{
  /* USER CODE BEGIN SVCall_IRQn 0 */

  /* USER CODE END SVCall_IRQn 0 */
  /* USER CODE BEGIN SVCall_IRQn 1 */

  /* USER CODE END SVCall_IRQn 1 */
}
DebugMon_Handler function · c · L158-L166 (9 LOC)
Src/stm32f4xx_it.c
void DebugMon_Handler(void)
{
  /* USER CODE BEGIN DebugMonitor_IRQn 0 */

  /* USER CODE END DebugMonitor_IRQn 0 */
  /* USER CODE BEGIN DebugMonitor_IRQn 1 */

  /* USER CODE END DebugMonitor_IRQn 1 */
}
PendSV_Handler function · c · L171-L179 (9 LOC)
Src/stm32f4xx_it.c
void PendSV_Handler(void)
{
  /* USER CODE BEGIN PendSV_IRQn 0 */

  /* USER CODE END PendSV_IRQn 0 */
  /* USER CODE BEGIN PendSV_IRQn 1 */

  /* USER CODE END PendSV_IRQn 1 */
}
SysTick_Handler function · c · L184-L193 (10 LOC)
Src/stm32f4xx_it.c
void SysTick_Handler(void)
{
  /* USER CODE BEGIN SysTick_IRQn 0 */

  /* USER CODE END SysTick_IRQn 0 */
  HAL_IncTick();
  /* USER CODE BEGIN SysTick_IRQn 1 */

  /* USER CODE END SysTick_IRQn 1 */
}
SystemInit function · c · L150-L167 (18 LOC)
Src/system_stm32f4xx.c
void SystemInit(void)
{
  /* FPU settings ------------------------------------------------------------*/
  #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
    SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2));  /* set CP10 and CP11 Full Access */
  #endif

#if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
  SystemInit_ExtMemCtl(); 
#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */

  /* Configure the Vector Table location add offset address ------------------*/
#ifdef VECT_TAB_SRAM
  SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#else
  SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
#endif
}
SystemCoreClockUpdate function · c · L205-L251 (47 LOC)
Src/system_stm32f4xx.c
void SystemCoreClockUpdate(void)
{
  uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
  
  /* Get SYSCLK source -------------------------------------------------------*/
  tmp = RCC->CFGR & RCC_CFGR_SWS;

  switch (tmp)
  {
    case 0x00:  /* HSI used as system clock source */
      SystemCoreClock = HSI_VALUE;
      break;
    case 0x04:  /* HSE used as system clock source */
      SystemCoreClock = HSE_VALUE;
      break;
    case 0x08:  /* PLL used as system clock source */

      /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N
         SYSCLK = PLL_VCO / PLL_P
         */    
      pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22;
      pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
      
      if (pllsource != 0)
      {
        /* HSE used as PLL clock source */
        pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
      }
      else
      {
        /* HSI used as PLL clock source */
        pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCF
Repobility — the code-quality scanner for AI-generated software · https://repobility.com
SystemInit_ExtMemCtl function · c · L264-L416 (153 LOC)
Src/system_stm32f4xx.c
void SystemInit_ExtMemCtl(void)
{
  __IO uint32_t tmp = 0x00;

  register uint32_t tmpreg = 0, timeout = 0xFFFF;
  register __IO uint32_t index;

  /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
  RCC->AHB1ENR |= 0x000001F8;

  /* Delay after an RCC peripheral clock enabling */
  tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);
  
  /* Connect PDx pins to FMC Alternate function */
  GPIOD->AFR[0]  = 0x00CCC0CC;
  GPIOD->AFR[1]  = 0xCCCCCCCC;
  /* Configure PDx pins in Alternate function mode */  
  GPIOD->MODER   = 0xAAAA0A8A;
  /* Configure PDx pins speed to 100 MHz */  
  GPIOD->OSPEEDR = 0xFFFF0FCF;
  /* Configure PDx pins Output type to push-pull */  
  GPIOD->OTYPER  = 0x00000000;
  /* No pull-up, pull-down for PDx pins */ 
  GPIOD->PUPDR   = 0x00000000;

  /* Connect PEx pins to FMC Alternate function */
  GPIOE->AFR[0]  = 0xC00CC0CC;
  GPIOE->AFR[1]  = 0xCCCCCCCC;
  /* Configure PEx pins in Alternate function mode */ 
  GPIOE->MODER   = 0xAAAA8
SystemInit_ExtMemCtl function · c · L427-L714 (288 LOC)
Src/system_stm32f4xx.c
void SystemInit_ExtMemCtl(void)
{
  __IO uint32_t tmp = 0x00;
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
 || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
#if defined (DATA_IN_ExtSDRAM)
  register uint32_t tmpreg = 0, timeout = 0xFFFF;
  register __IO uint32_t index;

#if defined(STM32F446xx)
  /* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
      clock */
  RCC->AHB1ENR |= 0x0000007D;
#else
  /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface 
      clock */
  RCC->AHB1ENR |= 0x000001F8;
#endif /* STM32F446xx */  
  /* Delay after an RCC peripheral clock enabling */
  tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);
  
#if defined(STM32F446xx)
  /* Connect PAx pins to FMC Alternate function */
  GPIOA->AFR[0]  |= 0xC0000000;
  GPIOA->AFR[1]  |= 0x00000000;
  /* Configure PDx pins in Alternate function mode */
  GPIOA->MODER   |= 0x00008000;
  /* Configure PDx pins speed to 
tdf8546_init function · c · L30-L79 (50 LOC)
Src/tdf8546.c
    uint8_t tdf8546_init(void)
    {
        IB1.B.ampStart = 1;
        IB1.B.startUpDiag = 0;
        IB1.B.acLoadDetection = 0;
        IB1.B.channel2Info = 0;
        IB1.B.channel4Info = 0;
        IB1.B.channel1Info = 0;
        IB1.B.channel3Info = 0;
        IB1.B.chipDetection = 0;

        IB2.B.fastMuteAll = 0;
        IB2.B.softMuteCh2Ch4 = 0;
        IB2.B.softMuteCh1Ch3 = 0;
        IB2.B.emptyBit = 0;
        IB2.B.shortDiag = 1;
        IB2.B.tempDiag = 0;
        IB2.B.chipDetection0 = 0;
        IB2.B.chipDetection1 = 0;

        IB3.B.disableCh2 = 0;
        IB3.B.disableCh4 = 0;
        IB3.B.disableCh1 = 0;
        IB3.B.disableCh3 = 0;
        IB3.B.tempPreWarning = 1;
        IB3.B.gainCh2Ch4 = 0;
        IB3.B.gainCh1Ch3 = 0;
        IB3.B.emptyBit = 0;

        IB4.B.muteUnderVoltage = 0;
        IB4.B.acLoadDetect = 1;
        IB4.B.driverOrGain = 0;
        IB4.B.emptyBit = 0;
        IB4.B.loadInfo = 0;
        IB4.B.overVoltageWarn = 1;
        IB4.B.shutDo
tdf8546_mute function · c · L80-L137 (58 LOC)
Src/tdf8546.c
    uint8_t tdf8546_mute(void)
    {
		IB1.B.ampStart = 1;
        IB1.B.startUpDiag = 0;
        IB1.B.acLoadDetection = 0;
        IB1.B.channel2Info = 0;
        IB1.B.channel4Info = 0;
        IB1.B.channel1Info = 0;
        IB1.B.channel3Info = 0;
        IB1.B.chipDetection = 0;

        IB2.B.fastMuteAll = 1;
        IB2.B.softMuteCh2Ch4 = 0;
        IB2.B.softMuteCh1Ch3 = 0;
        IB2.B.emptyBit = 0;
        IB2.B.shortDiag = 1;
        IB2.B.tempDiag = 0;
        IB2.B.chipDetection0 = 0;
        IB2.B.chipDetection1 = 0;

        IB3.B.disableCh2 = 0;
        IB3.B.disableCh4 = 0;
        IB3.B.disableCh1 = 0;
        IB3.B.disableCh3 = 0;
        IB3.B.tempPreWarning = 1;
        IB3.B.gainCh2Ch4 = 0;
        IB3.B.gainCh1Ch3 = 0;
        IB3.B.emptyBit = 0;

        IB4.B.muteUnderVoltage = 0;
        IB4.B.acLoadDetect = 1;
        IB4.B.driverOrGain = 0;
        IB4.B.emptyBit = 0;
        IB4.B.loadInfo = 0;
        IB4.B.overVoltageWarn = 1;
        IB4.B.shutDownMut
tdf8546_unmute function · c · L138-L188 (51 LOC)
Src/tdf8546.c
    uint8_t tdf8546_unmute(void)
    {
        IB1.B.ampStart = 1;
        IB1.B.startUpDiag = 0;
        IB1.B.acLoadDetection = 0;
        IB1.B.channel2Info = 0;
        IB1.B.channel4Info = 0;
        IB1.B.channel1Info = 0;
        IB1.B.channel3Info = 0;
        IB1.B.chipDetection = 0;

        IB2.B.fastMuteAll = 0;
        IB2.B.softMuteCh2Ch4 = 0;
        IB2.B.softMuteCh1Ch3 = 0;
        IB2.B.emptyBit = 0;
        IB2.B.shortDiag = 1;
        IB2.B.tempDiag = 0;
        IB2.B.chipDetection0 = 0;
        IB2.B.chipDetection1 = 0;

        IB3.B.disableCh2 = 0;
        IB3.B.disableCh4 = 0;
        IB3.B.disableCh1 = 0;
        IB3.B.disableCh3 = 0;
        IB3.B.tempPreWarning = 1;
        IB3.B.gainCh2Ch4 = 0;
        IB3.B.gainCh1Ch3 = 0;
        IB3.B.emptyBit = 0;

        IB4.B.muteUnderVoltage = 0;
        IB4.B.acLoadDetect = 1;
        IB4.B.driverOrGain = 0;
        IB4.B.emptyBit = 0;
        IB4.B.loadInfo = 0;
        IB4.B.overVoltageWarn = 1;
        IB4.B.shu
tdf8546_get_amp_status function · c · L189-L193 (5 LOC)
Src/tdf8546.c
    uint8_t tdf8546_get_amp_status(uint8_t *p_amp_status)
    {
	    return 0;
	}
prvSendDataTotdf8546 function · c · L194-L233 (40 LOC)
Src/tdf8546.c
    static uint8_t prvSendDataTotdf8546(void)
    {
        while(HAL_I2C_Master_Transmit(&hi2c1, (uint16_t)device_address, &IB1.IB1Data, 1, 1000) != HAL_OK)
        {
            if (HAL_I2C_GetError(&hi2c1) != HAL_I2C_ERROR_AF)
            {
                return 0;
            }
        }
        while(HAL_I2C_Master_Transmit(&hi2c1, (uint16_t)device_address, &IB2.IB2Data, 1, 1000) != HAL_OK)
        {
            if (HAL_I2C_GetError(&hi2c1) != HAL_I2C_ERROR_AF)
            {
                return 0;
            }
        }
        while(HAL_I2C_Master_Transmit(&hi2c1, (uint16_t)device_address, &IB3.IB3Data, 1, 1000) != HAL_OK)
        {
            if (HAL_I2C_GetError(&hi2c1) != HAL_I2C_ERROR_AF)
            {
                return 0;
            }
        }
        while(HAL_I2C_Master_Transmit(&hi2c1, (uint16_t)device_address, &IB4.IB4Data, 1, 1000) != HAL_OK)
        {
            if (HAL_I2C_GetError(&hi2c1) != HAL_I2C_ERROR_AF)
            {
                return 0;