1b049dde5Sopenharmony_ci/* 2b049dde5Sopenharmony_ci * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. 3b049dde5Sopenharmony_ci * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. 4b049dde5Sopenharmony_ci * 5b049dde5Sopenharmony_ci * Redistribution and use in source and binary forms, with or without modification, 6b049dde5Sopenharmony_ci * are permitted provided that the following conditions are met: 7b049dde5Sopenharmony_ci * 8b049dde5Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright notice, this list of 9b049dde5Sopenharmony_ci * conditions and the following disclaimer. 10b049dde5Sopenharmony_ci * 11b049dde5Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright notice, this list 12b049dde5Sopenharmony_ci * of conditions and the following disclaimer in the documentation and/or other materials 13b049dde5Sopenharmony_ci * provided with the distribution. 14b049dde5Sopenharmony_ci * 15b049dde5Sopenharmony_ci * 3. Neither the name of the copyright holder nor the names of its contributors may be used 16b049dde5Sopenharmony_ci * to endorse or promote products derived from this software without specific prior written 17b049dde5Sopenharmony_ci * permission. 18b049dde5Sopenharmony_ci * 19b049dde5Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20b049dde5Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 21b049dde5Sopenharmony_ci * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22b049dde5Sopenharmony_ci * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 23b049dde5Sopenharmony_ci * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24b049dde5Sopenharmony_ci * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25b049dde5Sopenharmony_ci * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 26b049dde5Sopenharmony_ci * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27b049dde5Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28b049dde5Sopenharmony_ci * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29b049dde5Sopenharmony_ci * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30b049dde5Sopenharmony_ci */ 31b049dde5Sopenharmony_ci 32b049dde5Sopenharmony_ci#ifndef HIEVENT_DRIVER_H 33b049dde5Sopenharmony_ci#define HIEVENT_DRIVER_H 34b049dde5Sopenharmony_ci 35b049dde5Sopenharmony_ci#include <sys/types.h> 36b049dde5Sopenharmony_ci 37b049dde5Sopenharmony_ci#define CHECK_CODE 0x7BCDABCD 38b049dde5Sopenharmony_ci 39b049dde5Sopenharmony_cistruct IdapHeader { 40b049dde5Sopenharmony_ci char level; 41b049dde5Sopenharmony_ci char category; 42b049dde5Sopenharmony_ci char logType; 43b049dde5Sopenharmony_ci char sn; 44b049dde5Sopenharmony_ci}; 45b049dde5Sopenharmony_ci 46b049dde5Sopenharmony_ciint HieventInit(void); 47b049dde5Sopenharmony_ciint HieventWriteInternal(const char *buffer, size_t buflen); 48b049dde5Sopenharmony_ci 49b049dde5Sopenharmony_ci#endif /* HIEVENT_DRIVER_H */ 50