zephyr: Remove support for deprecated int types

Its been 2 releases since we deprecated the old zephyr integer types.
We can now remove support for the Kconfig option, code, and, test to
allow the old int types to be supported.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2021-03-02 20:12:51 -06:00 committed by Kumar Gala
parent e0de4ff227
commit 19e5a9c061
7 changed files with 3 additions and 54 deletions

View File

@ -436,13 +436,6 @@ config MAKEFILE_EXPORTS
Generates a file with build information that can be read by
third party Makefile-based build systems.
config DEPRECATED_ZEPHYR_INT_TYPES
bool "Allow the use of the deprecated zephyr integer types"
help
Allows the use of the deprecated Zephyr integer typedefs defined in
Zephyr 2.3 and previous versions. These types are:
u8_t, u16_t, u32_t, u64_t, s8_t, s16_t, s32_t, and s64_t.
endmenu
endmenu

View File

@ -57,6 +57,9 @@ Deprecated in this release
==========================
Removed APIs in this release
* Removed support for the old zephyr integer typedefs (u8_t, u16_t, etc...).
============================
Stable API changes in this release

View File

@ -14,20 +14,6 @@
extern "C" {
#endif
#ifdef CONFIG_DEPRECATED_ZEPHYR_INT_TYPES
typedef signed char s8_t;
typedef signed short s16_t;
typedef signed int s32_t;
typedef signed long long s64_t;
typedef unsigned char u8_t;
typedef unsigned short u16_t;
typedef unsigned int u32_t;
typedef unsigned long long u64_t;
#endif
/* 32 bits on ILP32 builds, 64 bits on LP64 builts */
typedef unsigned long ulong_t;

View File

@ -1,8 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.13.1)
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
project(test_inttypes)
target_sources(app PRIVATE src/main.c)

View File

@ -1 +0,0 @@
CONFIG_DEPRECATED_ZEPHYR_INT_TYPES=y

View File

@ -1,20 +0,0 @@
/*
* Copyright (c) 2020 Linaro
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
void main(void)
{
BUILD_ASSERT(sizeof(u8_t) == 1, "sizeof u8_t mismatch");
BUILD_ASSERT(sizeof(u16_t) == 2, "sizeof u16_t mismatch");
BUILD_ASSERT(sizeof(u32_t) == 4, "sizeof u32_t mismatch");
BUILD_ASSERT(sizeof(u64_t) == 8, "sizeof u64_t mismatch");
BUILD_ASSERT(sizeof(s8_t) == 1, "sizeof s8_t mismatch");
BUILD_ASSERT(sizeof(s16_t) == 2, "sizeof s16_t mismatch");
BUILD_ASSERT(sizeof(s32_t) == 4, "sizeof s32_t mismatch");
BUILD_ASSERT(sizeof(s64_t) == 8, "sizeof s64_t mismatch");
}

View File

@ -1,4 +0,0 @@
tests:
deprecated.inttypes:
build_only: true
tags: deprecated