/****************************************************************************** | |
* @file compiler.h | |
* | |
* @brief for TLSR chips | |
* | |
* @author public@telink-semi.com; | |
* @date Sep. 30, 2010 | |
* | |
* @attention | |
* | |
* Copyright (C) 2019-2020 Telink Semiconductor (Shanghai) Co., Ltd. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
* | |
*****************************************************************************/ | |
#pragma once | |
#include "../../common/config/user_config.h" | |
#define _attribute_packed_ __attribute__((packed)) | |
#define _attribute_aligned_(s) __attribute__((aligned(s))) | |
#define _attribute_session_(s) __attribute__((section(s))) | |
#define _attribute_ram_code_ _attribute_session_(".ram_code") | |
#define _attribute_custom_code_ _attribute_session_(".custom") volatile | |
#define _attribute_no_inline_ __attribute__((noinline)) | |
#define _inline_ inline | |
#ifndef BLC_PM_EN | |
#define BLC_PM_EN 1 | |
#endif | |
#ifndef BLC_PM_DEEP_RETENTION_MODE_EN | |
#define BLC_PM_DEEP_RETENTION_MODE_EN 1 | |
#endif | |
#if (BLC_PM_DEEP_RETENTION_MODE_EN) | |
#define _attribute_data_retention_ _attribute_session_(".retention_data") | |
#else | |
#define _attribute_data_retention_ | |
#endif | |