diff options
| author | hathach <[email protected]> | 2013-01-30 11:35:37 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-01-30 11:35:37 +0700 |
| commit | 07048b943e6b57aeee4a671b85d76a2f592e3205 (patch) | |
| tree | 63af67247cbd779590cb4f0aa6798faccf680b5d /tinyusb/common | |
| parent | 6db8af20236cfecba5aef54da148309982b28396 (diff) | |
add primitive_types.h for portable with uint8,16,32_t, and bool
add osal_common.h to ease the complaint of MISRA 19.1
implement OSAL_NONE Task loop, semaphore wait/post and its test code
Diffstat (limited to 'tinyusb/common')
| -rw-r--r-- | tinyusb/common/common.h | 4 | ||||
| -rw-r--r-- | tinyusb/common/primitive_types.h | 67 |
2 files changed, 68 insertions, 3 deletions
diff --git a/tinyusb/common/common.h b/tinyusb/common/common.h index 3a02f27f3..17c70429e 100644 --- a/tinyusb/common/common.h +++ b/tinyusb/common/common.h @@ -56,8 +56,7 @@ extern "C" { #endif -#include <stdbool.h> -#include <stdint.h> +#include "primitive_types.h" #include <stddef.h> #include <string.h> #include <stdio.h> @@ -71,7 +70,6 @@ #include "hal/hal.h" #include "core/tusb_types.h" #include "core/std_descriptors.h" -#include "osal/osal.h" // TODO try to manipulate gcc cmd option instead #ifndef _TEST_ diff --git a/tinyusb/common/primitive_types.h b/tinyusb/common/primitive_types.h new file mode 100644 index 000000000..063d6e443 --- /dev/null +++ b/tinyusb/common/primitive_types.h @@ -0,0 +1,67 @@ +/* + * primitive_types.h + * + * Created on: Jan 29, 2013 + * Author: hathach + */ + +/* + * Software License Agreement (BSD License) + * Copyright (c) 2012, hathach (tinyusb.net) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the tiny usb stack. + */ + +/** \file + * \brief TBD + * + * \note TBD + */ + +/** \ingroup TBD + * \defgroup TBD + * \brief TBD + * + * @{ + */ + +#ifndef _TUSB_PRIMITIVE_TYPES_H_ +#define _TUSB_PRIMITIVE_TYPES_H_ + +#ifdef __cplusplus + extern "C" { +#endif + +#include <stdbool.h> +#include <stdint.h> + +#ifdef __cplusplus + } +#endif + +#endif /* _TUSB_PRIMITIVE_TYPES_H_ */ + +/** @} */ |
