修改了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,29 @@
/**
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2017 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 _HAL_MX1290_H_
#define _HAL_MX1290_H_
#include "mx1290_vector.h"
#define __CM3_REV 0x0200 /**< Core revision r0p0 */
#define __MPU_PRESENT 1 /**< Defines if an MPU is present or not */
#define __NVIC_PRIO_BITS 4 /**< Number of priority bits implemented in the NVIC */
#define __Vendor_SysTickConfig 1 /**< Vendor specific implementation of SysTickConfig is defined *///see vPortSetupTimerInterrupt
#if !defined (__FPU_PRESENT)
#define __FPU_PRESENT 1 /*!< FPU present */
#define __VFP_FP__ 1
#endif /* __FPU_PRESENT */
#endif //_HAL_8710B_H_

View File

@@ -0,0 +1,95 @@
/**
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2017 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 _MX1290_VECTOR_TABLE_H_
#define _MX1290_VECTOR_TABLE_H_
/* Exported types ------------------------------------------------------------*/
/** @defgroup IRQ_Exported_Types IRQ Exported Types
* @{
*/
typedef int IRQn_Type;
typedef void (*HAL_VECTOR_FUN) (void);
typedef unsigned int (*IRQ_FUN)(void *Data);
/**
* @}
*/
/* Exported constants --------------------------------------------------------*/
/** @defgroup IRQ_Exported_Constants IRQ Exported Constants
* @{
*/
/** @defgroup IRQn_enum
* @{
*/
enum IRQn {
/****** Cortex-M4 Processor Exceptions Numbers ********/
NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
HardFault_IRQn = -13, /*!< 3 Hard Fault, all classes of Fault */
MemoryManagement_IRQn = -12, /*!< 4 Cortex-M3 Memory Management Interrupt */
BusFault_IRQn = -11, /*!< 5 Cortex-M3 Bus Fault Interrupt */
UsageFault_IRQn = -10, /*!< 6 Cortex-M3 Usage Fault Interrupt */
SVCall_IRQn = -5, /*!< 11 Cortex-M3 SV Call Interrupt */
DebugMonitor_IRQn = -4, /*!< 12 Cortex-M3 Debug Monitor Interrupt */
PendSV_IRQn = -2, /*!< 14 Cortex-M3 Pend SV Interrupt */
SysTick_IRQn = -1, /*!< 15 Cortex-M3 System Tick Interrupt */
/****** RTL8710B Specific Interrupt Numbers ************/
SYSTEM_ON_IRQ = 0, /*!< 16 SYS Interrupt for wakeup from power save */
WDG_IRQ = 1, /*!< 17 Watch dog global insterrupt */
TIMER0_IRQ = 2, /*!< 18 Timer0 global interrupt */
TIMER1_IRQ = 3, /*!< 19 Timer1 global interrupt */
TIMER2_IRQ = 4, /*!< 20 Timer2 global interrupt */
TIMER3_IRQ = 5, /*!< 21 Timer3 global interrupt */
SPI0_IRQ = 6, /*!< 22 SPI0 global interrupt for communication spi */
GPIO_IRQ = 7, /*!< 23 GPIO portA global interrupt */
UART0_IRQ = 8, /*!< 24 UART0 global interrupt */
SPI_FLASH_IRQ = 9, /*!< 25 SPI Flash global interrupt */
UART1_IRQ = 10, /*!< 26 UART1 global interrupt */
TIMER4_IRQ = 11, /*!< 27 Timer4 global interrupt */
SDIO_DEVICE_IRQ = 12, /*!< 28 SDIO device global interrupt */
I2S0_PCM0_IRQ = 13, /*!< 29 I2S0 global interrupt */
TIMER5_IRQ = 14, /*!< 30 Timer5 global interrupt */
WL_DMA_IRQ = 15, /*!< 31 Wlan Host global interrupt */
WL_PROTOCOL_IRQ = 16, /*!< 32 Wlan Firmware Wlan global interrupt */
CRYPTO_IRQ = 17, /*!< 33 IPsec global interrupt */
SPI1_IRQ = 18, /*!< 34 SPI1 global interrupt for communication spi */
PERIPHERAL_IRQ = 19, /*!< 35 not used */
GDMA0_CHANNEL0_IRQ = 20, /*!< 36 GDMA0 channel 0 global interrupt */
GDMA0_CHANNEL1_IRQ = 21, /*!< 37 GDMA0 channel 1 global interrupt */
GDMA0_CHANNEL2_IRQ = 22, /*!< 38 GDMA0 channel 2 global interrupt */
GDMA0_CHANNEL3_IRQ = 23, /*!< 39 GDMA0 channel 3 global interrupt */
GDMA0_CHANNEL4_IRQ = 24, /*!< 40 GDMA0 channel 4 global interrupt */
GDMA0_CHANNEL5_IRQ = 25, /*!< 41 GDMA0 channel 5 global interrupt */
I2C0_IRQ = 26, /*!< 42 I2C0 global interrupt */
I2C1_IRQ = 27, /*!< 43 I2C1 global interrupt */
UART_LOG_IRQ = 28, /*!< 44 log uart intr */
ADC_IRQ = 29, /*!< 45 adc intr */
RDP_IRQ = 30, /*!< 46 cpu rdp protection interrupt */
RTC_IRQ = 31, /*!< 47 rtc timer interrupt */
GDMA1_CHANNEL0_IRQ = 32, /*!< 48 GDMA1 channel 0 global interrupt */
GDMA1_CHANNEL1_IRQ = 33, /*!< 49 GDMA1 channel 1 global interrupt */
GDMA1_CHANNEL2_IRQ = 34, /*!< 50 GDMA1 channel 2 global interrupt */
GDMA1_CHANNEL3_IRQ = 35, /*!< 51 GDMA1 channel 3 global interrupt */
GDMA1_CHANNEL4_IRQ = 36, /*!< 52 GDMA1 channel 4 global interrupt */
GDMA1_CHANNEL5_IRQ = 37, /*!< 53 GDMA1 channel 5 global interrupt */
USB_IRQ = 38, /*!< 54 USOC interrupt */
RXI300_IRQ = 39, /*!< 55 RXI300 interrupt */
USB_SIE_IRQ = 40, /*!< 56 USB SIE interrupt */
};
#endif //_MX1290_VECTOR_TABLE_H_

View File

@@ -0,0 +1,185 @@
/**
******************************************************************************
* @file platform_mcu_peripheral.h
* @author William Xu
* @version V1.0.0
* @date 05-May-2014
* @brief This file provide all the headers of functions for stm32f2xx platform
******************************************************************************
* 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.
******************************************************************************
*/
#pragma once
#include "platform_cmsis.h"
#include "mico_rtos.h"
#include "RingBufferUtils.h"
//#include "lowlevel_drivers.h"
//#include "boot_flags.h"
#ifdef __cplusplus
extern "C"
{
#endif
/******************************************************
* Macros
******************************************************/
/******************************************************
* Constants
******************************************************/
/******************************************************
* Enumerations
******************************************************/
/******************************************************
* Type Definitions
******************************************************/
/**
* UART flow control for driver
*/
typedef enum
{
FLOW_CONTROL_DISABLED_DRV,
FLOW_CONTROL_CTS_DRV,
FLOW_CONTROL_RTS_DRV,
FLOW_CONTROL_CTS_RTS_DRV
} platform_uart_driver_flow_control_t;
/******************************************************
* Structures
******************************************************/
typedef struct
{
uint8_t unimplemented;
} platform_gpio_t;
typedef struct
{
uint8_t unimplemented;
} platform_adc_t;
typedef struct
{
uint8_t unimplemented;
} platform_pwm_t;
/* DMA can be enabled by setting SPI_USE_DMA */
typedef struct
{
uint8_t unimplemented;
} platform_spi_t;
typedef struct
{
platform_spi_t* peripheral;
mico_mutex_t spi_mutex;
mico_bool_t initialized;
} platform_spi_driver_t;
typedef struct
{
uint8_t unimplemented;
} platform_spi_slave_driver_t;
typedef struct
{
uint8_t unimplemented;
} platform_i2c_t;
typedef struct
{
mico_mutex_t i2c_mutex;
} platform_i2c_driver_t;
typedef void (* wakeup_irq_handler_t)(void *arg);
typedef struct
{
uint32_t port_id;
} platform_uart_t;
typedef struct
{
uint8_t id;
ring_buffer_t* rx_ring_buffer;
mico_semaphore_t rx_complete;
mico_semaphore_t tx_complete;
mico_mutex_t tx_mutex;
mico_semaphore_t sem_wakeup;
volatile uint32_t tx_size;
volatile uint32_t rx_size;
volatile OSStatus last_receive_result;
volatile OSStatus last_transmit_result;
platform_uart_driver_flow_control_t flow_control;
} platform_uart_driver_t;
typedef struct
{
uint32_t flash_type;
uint32_t flash_start_addr;
uint32_t flash_length;
} platform_flash_t;
typedef struct
{
const platform_flash_t* peripheral;
mico_mutex_t flash_mutex;
volatile bool initialized;
} platform_flash_driver_t;
/******************************************************
* Global Variables
******************************************************/
/******************************************************
* Function Declarations
******************************************************/
//int get_passive_firmware(void);
//int part_write_layout(void);
//OSStatus platform_gpio_irq_manager_init ( void );
//uint8_t platform_gpio_get_port_number ( platform_gpio_port_t* gpio_port );
//OSStatus platform_gpio_enable_clock ( const platform_gpio_t* gpio );
//OSStatus platform_gpio_set_alternate_function( platform_gpio_port_t* gpio_port, uint8_t pin_number, GPIOOType_TypeDef output_type, GPIOPuPd_TypeDef pull_up_down_type, uint8_t alternation_function );
//
//OSStatus platform_mcu_powersave_init ( void );
//
//OSStatus platform_rtc_init ( void );
//OSStatus platform_rtc_enter_powersave ( void );
//OSStatus platform_rtc_abort_powersave ( void );
//OSStatus platform_rtc_exit_powersave ( uint32_t requested_sleep_time, uint32_t *cpu_sleep_time );
//
//uint8_t platform_uart_get_port_number ( platform_uart_port_t* uart );
//void platform_uart_irq ( platform_uart_driver_t* driver );
//void platform_uart_tx_dma_irq ( platform_uart_driver_t* driver );
//void platform_uart_rx_dma_irq ( platform_uart_driver_t* driver );
//
//uint8_t platform_spi_get_port_number ( platform_spi_port_t* spi );
#ifdef __cplusplus
} /* extern "C" */
#endif