修改了Web后台的部分界面,增加了HAmqtt中的总电量传感器,后台新增mqtt上报频率设置

This commit is contained in:
OOP
2025-03-03 21:49:41 +08:00
parent e1e00b60ce
commit 9f9d4c7a56
4468 changed files with 1473046 additions and 10728 deletions

View File

@@ -0,0 +1,42 @@
/**
******************************************************************************
* @file dc_motor.c
* @author Eshen Wang
* @version V1.0.0
* @date 1-May-2015
* @brief dc motor operation.
******************************************************************************
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2016 MXCHIP Inc.
*
* The contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of MXCHIP Corporation.
******************************************************************************
*/
#include "mico_platform.h"
#include "dc_motor.h"
#define dc_motor_log(M, ...) custom_log("DC_MOTOR", M, ##__VA_ARGS__)
#define dc_motor_log_trace() custom_log_trace("DC_MOTOR")
/*------------------------------ USER INTERFACES -----------------------------*/
int dc_motor_init(void)
{
return MicoGpioInitialize( DC_MOTOR, OUTPUT_PUSH_PULL );
}
int dc_motor_set(int value)
{
if (0 == value) {
MicoGpioOutputLow( DC_MOTOR );
}
else {
MicoGpioOutputHigh( DC_MOTOR );
}
return 0;
}

View File

@@ -0,0 +1,82 @@
/**
******************************************************************************
* @file dc_motor.h
* @author Eshen Wang
* @version V1.0.0
* @date 1-May-2015
* @brief dc motor operation.
******************************************************************************
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2016 MXCHIP Inc.
*
* The contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of MXCHIP Corporation.
******************************************************************************
*/
#ifndef __DC_MOTOR_H_
#define __DC_MOTOR_H_
#include "platform.h"
/** @addtogroup MICO_Drivers_interface
* @{
*/
/** @defgroup MiCO_Motor_Driver MiCO Motor Driver
* @brief Provide driver interface for Motor Devices
* @{
*/
/** @addtogroup MiCO_Motor_Driver
* @{
*/
/** @defgroup MiCO_DC_Motor_Driver MiCO DC Motor Driver
* @brief Provide driver interface for DC Motor
* @{
*/
#ifndef DC_MOTOR
#define DC_MOTOR (MICO_GPIO_NONE)
#endif
//------------------------------ user interfaces -------------------------------
/**
* @brief Initialize motor device.
*
* @return 0 : on success.
* @return error code : if an error occurred
*/
int dc_motor_init(void);
/**
* @brief Set motor state, ON or OFF.
*
* @param value: 0,motor OFF; others<72><73>motor ON
*
* @return 0 : on success.
* @return error code : if an error occurred
*/
int dc_motor_set(int value);
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#endif // __DC_MOTOR_H_

View File

@@ -0,0 +1,16 @@
#
# UNPUBLISHED PROPRIETARY SOURCE CODE
# Copyright (c) 2016 MXCHIP Inc.
#
# The contents of this file may not be disclosed to third parties, copied or
# duplicated in any form, in whole or in part, without the prior written
# permission of MXCHIP Corporation.
#
NAME := Lib_dc_motor_$(PLATFORM)
$(NAME)_SOURCES := dc_motor.c
GLOBAL_INCLUDES := .
#$(NAME)_CFLAGS = $(COMPILER_SPECIFIC_PEDANTIC_CFLAGS)