changes to LOG_DEBUG tags
changed logger level to info for now in the UDP_broadcast header file , debug not needed fixed some tags
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "lwip/netif.h"
|
#include "lwip/netif.h"
|
||||||
#include "lwip.h"
|
#include "lwip.h"
|
||||||
#define LOGGER_LEVEL_ALL
|
#define LOGGER_LEVEL_INFO
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char name[20];
|
char name[20];
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//|
|
//|
|
||||||
#include "UDP_broadcast.h"
|
#include "UDP_broadcast.h"
|
||||||
|
|
||||||
|
static const char *TAG = "UDP_broadcast";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fn void set_owner_details_mac(owner_details_t*)
|
* @fn void set_owner_details_mac(owner_details_t*)
|
||||||
@@ -36,7 +37,7 @@ static void set_owner_details_mac(owner_details_t* owner){
|
|||||||
|
|
||||||
uint8_t set_owner_details_name(owner_details_t *owner, char *name){
|
uint8_t set_owner_details_name(owner_details_t *owner, char *name){
|
||||||
if(name != NULL){
|
if(name != NULL){
|
||||||
LOG_DEBUG("set_owner_details_name","set: %s",name);
|
LOG_DEBUG(TAG,"set: %s",name);
|
||||||
strncpy(owner->name,name,sizeof(owner->name));
|
strncpy(owner->name,name,sizeof(owner->name));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -56,7 +57,7 @@ uint8_t set_owner_details_name(owner_details_t *owner, char *name){
|
|||||||
*/
|
*/
|
||||||
uint8_t set_owner_details_surname(owner_details_t* owner, char* surname){
|
uint8_t set_owner_details_surname(owner_details_t* owner, char* surname){
|
||||||
if(surname != NULL){
|
if(surname != NULL){
|
||||||
LOG_DEBUG("set_owner_details_surname","set: %s",surname);
|
LOG_DEBUG(TAG,"set: %s",surname);
|
||||||
strncpy(owner->surname,surname,sizeof(owner->surname));
|
strncpy(owner->surname,surname,sizeof(owner->surname));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -76,7 +77,7 @@ uint8_t set_owner_details_surname(owner_details_t* owner, char* surname){
|
|||||||
|
|
||||||
static uint8_t set_owner_details_reply(owner_details_t *owner, char *reply){
|
static uint8_t set_owner_details_reply(owner_details_t *owner, char *reply){
|
||||||
if(reply != NULL){
|
if(reply != NULL){
|
||||||
LOG_DEBUG("set_owner_details_reply","set: %s",reply);
|
LOG_DEBUG(TAG,"set: %s",reply);
|
||||||
strncpy(owner->reply,reply,sizeof(owner->reply));
|
strncpy(owner->reply,reply,sizeof(owner->reply));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -178,7 +179,7 @@ char* get_owner_details_surname(owner_details_t* owner){
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
char* get_owner_details_reply(owner_details_t *owner){
|
char* get_owner_details_reply(owner_details_t *owner){
|
||||||
LOG_DEBUG("get_owner_details_reply","getting reply");
|
LOG_DEBUG(TAG,"getting reply");
|
||||||
char err_reply[20] = "no reply yet";
|
char err_reply[20] = "no reply yet";
|
||||||
if(owner->reply == NULL){
|
if(owner->reply == NULL){
|
||||||
strncpy(owner->reply,err_reply,sizeof(owner->reply));
|
strncpy(owner->reply,err_reply,sizeof(owner->reply));
|
||||||
|
|||||||
@@ -111,16 +111,16 @@ int main(void)
|
|||||||
MX_QUADSPI_Init();
|
MX_QUADSPI_Init();
|
||||||
/* USER CODE BEGIN 2 */
|
/* USER CODE BEGIN 2 */
|
||||||
owner_details_t owner;
|
owner_details_t owner;
|
||||||
LOG_DEBUG("main1","\nhelloworld");
|
LOG_DEBUG(TAG,"\nhelloworld");
|
||||||
LOG_DEBUG("main2","%s",get_owner_details_reply(&owner));
|
LOG_DEBUG(TAG,"%s",get_owner_details_reply(&owner));
|
||||||
if(!set_owner_details(&owner, "joran", "vn")){
|
if(!set_owner_details(&owner, "joran", "vn")){
|
||||||
LOG_DEBUG("main3","error");;
|
LOG_DEBUG(TAG,"error");;
|
||||||
}
|
}
|
||||||
LOG_DEBUG("main4","%s",get_owner_details_reply(&owner));
|
LOG_DEBUG(TAG,"%s",get_owner_details_reply(&owner));
|
||||||
if(!set_owner_details(&owner, "joran", "Van Nieuwenhoven")){
|
if(!set_owner_details(&owner, "joran", "Van Nieuwenhoven")){
|
||||||
LOG_DEBUG("main5","error");
|
LOG_DEBUG(TAG,"error");
|
||||||
}
|
}
|
||||||
LOG_DEBUG("main6","%s",get_owner_details_reply(&owner));
|
LOG_DEBUG(TAG,"%s",get_owner_details_reply(&owner));
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
|
|||||||
Reference in New Issue
Block a user