Subversion Repositories testOled

Rev

Rev 4 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 8
Line 100... Line 100...
100
    PB6     ------> I2C1_SCL
100
    PB6     ------> I2C1_SCL
101
    PB7     ------> I2C1_SDA
101
    PB7     ------> I2C1_SDA
102
    */
102
    */
103
    GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
103
    GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
104
    GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
104
    GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
105
    GPIO_InitStruct.Pull = GPIO_NOPULL;
105
    GPIO_InitStruct.Pull = GPIO_PULLUP;
106
    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
106
    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
107
 
107
 
108
    /* Peripheral clock enable */
108
    /* Peripheral clock enable */
109
    __HAL_RCC_I2C1_CLK_ENABLE();
109
    __HAL_RCC_I2C1_CLK_ENABLE();
110
  /* USER CODE BEGIN I2C1_MspInit 1 */
110
  /* USER CODE BEGIN I2C1_MspInit 1 */