diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 186060d9..8d0f004c 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -40,7 +40,7 @@ //#define AITHINKER_AI_LIGHT //#define MAGICHOME_LED_CONTROLLER //#define MAGICHOME_LED_CONTROLLER_20 -//#define HUACANXING_H801 +#define HUACANXING_H801 //#define HUACANXING_H802 //#define JANGOE_WIFI_RELAY_NC //#define JANGOE_WIFI_RELAY_NO diff --git a/code/espurna/libs/fs_math.c b/code/espurna/fs_math.c similarity index 95% rename from code/espurna/libs/fs_math.c rename to code/espurna/fs_math.c index 8f45eb26..868ba382 100644 --- a/code/espurna/libs/fs_math.c +++ b/code/espurna/fs_math.c @@ -6,7 +6,7 @@ /* BEGIN fs_math.c */ -#include "fs_math.h" +#include "libs/fs_math.h" #include /* diff --git a/code/espurna/libs/pwm.h b/code/espurna/libs/pwm.h index bf5605fb..488a129c 100755 --- a/code/espurna/libs/pwm.h +++ b/code/espurna/libs/pwm.h @@ -1,15 +1,28 @@ +/* + * Copyright (C) 2016 Stefan BrĂ¼ns + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + #ifndef __PWM_H__ #define __PWM_H__ -/*pwm.h: function and macro definition of PWM API , driver level */ -/*user_light.h: user interface for light API, user level*/ -/*user_light_adj: API for color changing and lighting effects, user level*/ - - - /*NOTE!! : DO NOT CHANGE THIS FILE*/ - - /*SUPPORT UP TO 8 PWM CHANNEL*/ -//#define PWM_CHANNEL_NUM_MAX 8 +/*SUPPORT UP TO 8 PWM CHANNEL*/ +#ifndef PWM_CHANNEL_NUM_MAX +#define PWM_CHANNEL_NUM_MAX 8 +#endif struct pwm_param { uint32 period; @@ -17,7 +30,6 @@ struct pwm_param { uint32 duty[PWM_CHANNEL_NUM_MAX]; //PWM_CHANNEL<=8 }; - /* pwm_init should be called only once, for now */ void pwm_init(uint32 period, uint32 *duty,uint32 pwm_channel_num,uint32 (*pin_info_list)[3]); void pwm_start(void); diff --git a/code/espurna/libs/pwm.c b/code/espurna/pwm.c similarity index 99% rename from code/espurna/libs/pwm.c rename to code/espurna/pwm.c index 0e3794c1..ee18814d 100644 --- a/code/espurna/libs/pwm.c +++ b/code/espurna/pwm.c @@ -43,9 +43,9 @@ #endif #include -#include #include #include +#include "libs/pwm.h" // from SDK hw_timer.c #define TIMER1_DIVIDE_BY_16 0x0004