You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
// kwccoin: include the includes file here:
#include <stdio.h>
#include "liquidcrystal_i2c.h"
/* USER CODE END Includes */
...
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
I2C_HandleTypeDef hi2c2;
/* USER CODE END PV */
...
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MPU_Config(void);
static void MX_GPIO_Init(void);
static void MX_I2C2_Init(void);
/* USER CODE BEGIN PFP */
//kwccoin not sure:
// see https://stackoverflow.com/questions/10162465/implicit-declaration-of-function-itoa-is-invalid-in-c99
char* itoa(int, char* , int);
/* USER CODE END PFP */
...
// kwccoin:
// remove this as x should be in the loop?
// int x;
for(int x=0; x<40; x=x+1)
{
HD44780_ScrollDisplayLeft(); //HD44780_ScrollDisplayRight();
HAL_Delay(500);
}
// kwccoin:
// would this be better to use sprintf/printf
// but since itoa still work I have not changed it
//int load = 15;
//char buffer[100];
//sprintf(buffer,"%d",load);
//printf("buffer in int = %s\n",buffer);
char snum[5];
for ( int x = 1; x <= 200 ; x++ )
{
itoa(x, snum, 10);
// sprintf(buffer,"%d",x);
// printf("buffer in int = %s\n",buffer);
I need to update also the hi2c1 to hi2c2 as I c2 (as I use PF0 and PF1) and hence
extern I2C_HandleTypeDef hi2c2
Seems there are warning about clock signal ... but it works. All might be minor issue.
The text was updated successfully, but these errors were encountered:
kwccoin
changed the title
Try to use stm32h7xx_hal.h and still cannot pass
Try to use stm32h7xx_hal.h and can pass with some minor issues
Sep 13, 2024
As C99 cannot get
I need to update also the hi2c1 to hi2c2 as I c2 (as I use PF0 and PF1) and hence
Seems there are warning about clock signal ... but it works. All might be minor issue.
The text was updated successfully, but these errors were encountered: