strcpy -> strncpy
main was before uart init
This commit is contained in:
@@ -82,14 +82,6 @@ static void MX_QUADSPI_Init(void);
|
||||
int main(void)
|
||||
{
|
||||
/* USER CODE BEGIN 1 */
|
||||
owner_details_t owner;
|
||||
printf("hello world");
|
||||
LOG_DEBUG("main","helloworld");
|
||||
LOG_DEBUG("main","%s",get_owner_details_reply(owner));
|
||||
set_owner_details(&owner, "joran", "vn");
|
||||
LOG_DEBUG("main","%s",get_owner_details_reply(owner));
|
||||
set_owner_details(&owner, "joran", "Van Nieuwenhoven");
|
||||
LOG_DEBUG("main","%s",get_owner_details_reply(owner));
|
||||
|
||||
/* USER CODE END 1 */
|
||||
|
||||
@@ -118,7 +110,13 @@ int main(void)
|
||||
MX_LWIP_Init();
|
||||
MX_QUADSPI_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
|
||||
owner_details_t owner;
|
||||
LOG_DEBUG("main1","helloworld");
|
||||
LOG_DEBUG("main2","%s",get_owner_details_reply(owner));
|
||||
set_owner_details(&owner, "joran", "vn");
|
||||
LOG_DEBUG("main3","%s",get_owner_details_reply(owner));
|
||||
set_owner_details(&owner, "joran", "Van Nieuwenhoven");
|
||||
LOG_DEBUG("main4","%s",get_owner_details_reply(owner));
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
|
||||
Reference in New Issue
Block a user