Files
kunlun/inc/driver/iot_log.h

63 lines
2.1 KiB
C
Raw Normal View History

2024-09-28 14:24:04 +08:00
/****************************************************************************
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_LOG_H
#define IOT_LOG_H
#include "iot_log_api.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief iot_log_dev_open_no_lock() - open log flash part no lock
*
* @return -1 -- open log flash part failed
* @return other -- open log flash part successfully
*
*/
int32_t iot_log_dev_open_no_lock();
/**
* @brief iot_log_dev_write_no_lock() - write log flash part data no lock
* @param fd: log flash part file pointer
* @param buf: the pointer of data to be written
* @param count: the size of data to be written
* "count" is below the built-in flash size
*
* @return -1 -- write log flash part data failed
* @return other -- return the written size
*
*/
int32_t iot_log_dev_write_no_lock(int32_t fd, void*buf, size_t count);
/**
* @brief iot_log_save_task_crash_dump() - save task crash info into flash
*
* it will append write to flash after last time,
* but overwrite after reset system.
*
* @return 0 -- save ok
* @return other -- save failed
*
*/
int32_t iot_log_save_task_crash_dump(uint8_t *buf, uint32_t size);
#ifdef __cplusplus
}
#endif
#endif //IOT_LOG_H