Files
kunlun/inc/host_interface/iot_cli_ram_operation.h
2024-09-28 14:24:04 +08:00

70 lines
2.0 KiB
C

/****************************************************************************
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
be copied by any method or incorporated into another program without
the express written consent of Aerospace C.Power. This Information or any portion
thereof remains the property of Aerospace C.Power. The Information contained herein
is believed to be accurate and Aerospace C.Power assumes no responsibility or
liability for its use in any way and conveys no license or title under
any patent or copyright and makes no representation or warranty that this
Information is free from patent or copyright infringement.
****************************************************************************/
#ifndef IOT_CLI_RAM_OPERATION_H
#define IOT_CLI_RAM_OPERATION_H
#include "iot_utils_api.h"
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(push) // save the pack status
#pragma pack(1) // one byte align
#define CLI_RAM_OPERATION_MAX_SIZE (400)
/* read ram info */
typedef struct _cli_read_ram_info {
uint32_t addr;
uint16_t len;
} cli_read_ram_info;
/* ram info */
typedef struct _cli_ram_info {
uint32_t addr;
uint16_t len;
uint8_t ram[CLI_RAM_OPERATION_MAX_SIZE];
} cli_ram_info;
/* set ram ack */
typedef struct _cli_set_sam_ack {
uint8_t ack;
} cli_set_sam_ack;
/**
* @brief cli_read_ram() - read ram handler
* @param buffer: buffer ptr
* @param bufferlen: buffer len
* @param src_mac: source mac
*/
void cli_read_ram(uint8_t *buffer, uint32_t bufferlen, uint8_t *src_mac);
/**
* @brief cli_set_ram() - set ram handler
* @param buffer: buffer ptr
* @param bufferlen: buffer len
* @param src_mac: source mac
*/
void cli_set_ram(uint8_t *buffer, uint32_t bufferlen, uint8_t *src_mac);
#pragma pack(pop)
#ifdef __cplusplus
}
#endif
#endif // !IOT_CLI_RAM_OPERATION_H