Simulated product dispenser

Dependencies:   HTS221

Fork of mbed-cloud-workshop-connect-HTS221 by Jim Carver

Embed: (wiki syntax)

« Back to documentation index

ns_types.h File Reference

ns_types.h File Reference

Basic compiler and type setup. More...

Go to the source code of this file.

Data Structures

struct  ns_iovec
 Scatter-gather descriptor. More...

Typedefs

typedef struct ns_iovec ns_iovec_t
 Scatter-gather descriptor.

Detailed Description

Basic compiler and type setup.

We currently assume C99 or later.

C99 features being relied on:

  • <inttypes.h> and <stdbool.h>
  • inline (with C99 semantics, not C++ as per default GCC);
  • designated initialisers;
  • compound literals;
  • restrict;
  • [static N] in array parameters;
  • declarations in for statements;
  • mixing declarations and statements

Compilers should be set to C99 or later mode when building Nanomesh source. For GCC this means "-std=gnu99" (C99 with usual GNU extensions).

Also, a little extra care is required for public header files that could be included from C++, especially as C++ lacks some C99 features.

(TODO: as this is exposed to API users, do we need a predefine to distinguish internal and external use, for finer control? Not yet, but maybe...)

Definition in file ns_types.h.


Typedef Documentation

typedef struct ns_iovec ns_iovec_t

Scatter-gather descriptor.

Slightly optimised for small platforms - we assume we won't need any element bigger than 64K.