Introduce new sized integer typedefs

This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t.  This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.

We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.

We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.

Jira: ZEP-2051

Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-04-19 10:32:08 -05:00 committed by Anas Nashif
commit 789081673f
204 changed files with 233 additions and 204 deletions

View file

@ -18,7 +18,7 @@ extern "C" {
#include <sys_io.h>
#include <arch/arc/v2/aux_regs.h>
#include <stdint.h>
#include <zephyr/types.h>
#include <stddef.h>
/**

View file

@ -112,7 +112,7 @@ extern "C" {
#ifndef _ASMLANGUAGE
#if defined(__GNUC__)
#include <stdint.h>
#include <zephyr/types.h>
#define _arc_v2_aux_reg_read(reg) __builtin_arc_lr((volatile uint32_t)reg)
#define _arc_v2_aux_reg_write(reg, val) __builtin_arc_sr((unsigned int)val, (volatile uint32_t)reg)

View file

@ -20,7 +20,7 @@ extern "C" {
#ifndef _ASMLANGUAGE
#include <stdint.h>
#include <zephyr/types.h>
/**
*

View file

@ -29,7 +29,7 @@ extern "C" {
#define _SCS_ICSR_RETTOBASE (1 << 11)
#else /* !_ASMLANGUAGE */
#include <stdint.h>
#include <zephyr/types.h>
#include <arch/arm/cortex_m/exc.h>
#include <irq.h>

View file

@ -43,7 +43,7 @@ extern "C" {
#ifdef _ASMLANGUAGE
GTEXT(_ExcExit);
#else
#include <stdint.h>
#include <zephyr/types.h>
struct __esf {
sys_define_gpr_with_alias(a1, r0);

View file

@ -36,7 +36,7 @@ extern "C" {
#define SIZEOFUNIT_TO_OCTET(X) (X)
#ifndef _ASMLANGUAGE
#include <stdint.h>
#include <zephyr/types.h>
#include <irq.h>
#include <sw_isr_table.h>

View file

@ -51,7 +51,7 @@ extern "C"
#ifndef _ASMLANGUAGE
#include <stdint.h>
#include <zephyr/types.h>
#include <arch/cpu.h>
#include <sys_io.h>

View file

@ -19,7 +19,7 @@ extern "C" {
#endif
#ifndef _ASMLANGUAGE
#include <stdint.h>
#include <zephyr/types.h>
#include <toolchain.h>
struct __esf {

View file

@ -23,7 +23,7 @@ extern "C" {
#endif
#ifndef _ASMLANGUAGE
#include <stdint.h>
#include <zephyr/types.h>
#include <stddef.h>
/**

View file

@ -7,7 +7,7 @@
#ifndef _SEGMENTATION_H
#define _SEGMENTATION_H
#include <stdint.h>
#include <zephyr/types.h>
/* Host gen_idt uses this header as well, don't depend on toolchain.h */
#ifndef __packed

View file

@ -21,7 +21,7 @@ extern "C" {
#if !defined(_ASMLANGUAGE) && !defined(__ASSEMBLER__)
#include "sys_io.h" /* Include from the very same folder of this file */
#include <stdint.h>
#include <zephyr/types.h>
#include <sw_isr_table.h>
#include <arch/xtensa/xtensa_irq.h>
#include <xtensa/config/core.h>