diff --git a/Core/App/global.c b/Core/App/global.c index d726a08..637ca2a 100644 --- a/Core/App/global.c +++ b/Core/App/global.c @@ -2,8 +2,8 @@ #include "global.h" GlobalData global_data = { - 901, // freq - 0, // freq_float + 901 * 2, // freq + G_RF_MODE_FM, //rf_mode 16, // volumn 97 //signal }; diff --git a/Core/App/global.h b/Core/App/global.h index 947ee83..ecf0f43 100644 --- a/Core/App/global.h +++ b/Core/App/global.h @@ -1,10 +1,12 @@ /** Global Data Define */ #pragma once #include +#define G_RF_MODE_FM 0x00 +#define G_RF_MODE_AM 0x01 typedef struct GlobalData { - uint32_t freq; - uint8_t freq_float; + uint16_t freq; // FM x50kHz AM x1kHz + uint8_t rf_mode; uint8_t volumn; uint8_t signal; } GlobalData; diff --git a/Makefile b/Makefile index 81614c8..8b63699 100644 --- a/Makefile +++ b/Makefile @@ -20,9 +20,13 @@ TARGET = radio-gnumake # building variables ###################################### # debug build? -DEBUG = 1 +DEBUG ?= 1 # optimization -OPT = -Og +ifeq ($(DEBUG), 1) + OPT = -Og +else + OPT = -O3 +endif #######################################