add O in makefile, change greq in global

This commit is contained in:
Sheikah 2023-01-26 23:23:01 +08:00
parent 22f90eb896
commit d5c13596ce
3 changed files with 12 additions and 6 deletions

View File

@ -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
};

View File

@ -1,10 +1,12 @@
/** Global Data Define */
#pragma once
#include <stdint.h>
#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;

View File

@ -20,9 +20,13 @@ TARGET = radio-gnumake
# building variables
######################################
# debug build?
DEBUG = 1
DEBUG ?= 1
# optimization
ifeq ($(DEBUG), 1)
OPT = -Og
else
OPT = -O3
endif
#######################################