start to work with doxygen
fix mem_size/mem_base usage with device rom driver
This commit is contained in:
+15
-10
@@ -35,19 +35,28 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief Architecture Header
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/** \ingroup Group_Common
|
||||
* \defgroup Group_Arch Architecture
|
||||
* \brief Group_Arch brief
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_ARCH_H_
|
||||
#define _TUSB_ARCH_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ARCH_LPC134X 1
|
||||
#define ARCH_LPC43XX 2
|
||||
#define ARCH ARCH_LPC134X
|
||||
|
||||
#define ENDIAN_LITTLE
|
||||
#define ALIGNMENT (4)
|
||||
#define ENDIAN_LITTLE ///< MCU Endian
|
||||
#define ALIGNMENT (4) ///< MCU Alignment
|
||||
|
||||
#if ARCH == ARCH_LPC134X
|
||||
#include "arch_lpc134x.h"
|
||||
@@ -55,8 +64,4 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_ARCH_H_ */
|
||||
|
||||
@@ -35,13 +35,20 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief LPC13Uxx Header
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/** \ingroup Group_Arch
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_ARCH_LPC134_X_H_
|
||||
#define _TUSB_ARCH_LPC134_X_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "arm_mx.h"
|
||||
#include "LPC13Uxx.h"
|
||||
|
||||
@@ -49,8 +56,4 @@
|
||||
|
||||
#define DEVICE_ROMDRIVER
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_ARCH_LPC134_X_H_ */
|
||||
|
||||
@@ -35,20 +35,25 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief LPC43xx Header
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/** \ingroup Group_Arch
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_ARCH_LPC43XX_H_
|
||||
#define _TUSB_ARCH_LPC43XX_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ARM_M4
|
||||
//#define ARM_M0
|
||||
|
||||
#include "arm_mx.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_ARCH_LPC43XX_H_ */
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -35,18 +35,22 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief ARM Cortex Mx Header
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/** \ingroup Group_Arch
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_ARM_MX_H_
|
||||
#define _TUSB_ARM_MX_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ENDIAN_LITTLE
|
||||
#define ALIGNMENT (4)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_ARM_MX_H_ */
|
||||
/// @}
|
||||
|
||||
+13
-8
@@ -35,13 +35,22 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief Common Header File
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/** \ingroup Group_TinyUSB
|
||||
* \defgroup Group_Common Common Files
|
||||
* \brief Group_Common brief
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_COMMON_H_
|
||||
#define _TUSB_COMMON_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
@@ -78,8 +87,4 @@
|
||||
|
||||
#define ASSERT_STATUS(sts) ASSERT_STATUS_MESSAGE(sts, NULL)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_COMMON_H_ */
|
||||
|
||||
@@ -35,19 +35,25 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief Compiler Header
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/** \ingroup Group_Common
|
||||
* \defgroup Group_Compiler Compiler
|
||||
* \brief Group_Compiler brief
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_COMPILER_H_
|
||||
#define _TUSB_COMPILER_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#include "compiler_gcc.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_COMPILER_H_ */
|
||||
/// @}
|
||||
|
||||
@@ -35,9 +35,16 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/** \file
|
||||
* \brief GCC Header
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/** \ingroup Group_Compiler
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_COMPILER_GCC_H_
|
||||
#define _TUSB_COMPILER_GCC_H_
|
||||
@@ -56,8 +63,6 @@
|
||||
#define ATTR_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result))
|
||||
#define ATTR_ALWAYS_INLINE __attribute__ ((always_inline))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_COMPILER_GCC_H_ */
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -35,3 +35,8 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
char const* const TUSB_ErrorStr[] = {
|
||||
# define ERROR_ENUM(x) #x,
|
||||
# include "errors_def"
|
||||
# undef ERROR_ENUM
|
||||
};
|
||||
|
||||
@@ -35,13 +35,31 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief Error Header
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/** \ingroup Group_Common
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_ERRORS_H_
|
||||
#define _TUSB_ERRORS_H_
|
||||
|
||||
enum TUSB_ERROR {
|
||||
# define ERROR_ENUM(x) x,
|
||||
# include "errors_def"
|
||||
# undef ERROR_ENUM
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern char const* const TUSB_ErrorStr[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+30
-9
@@ -35,23 +35,40 @@
|
||||
* This file is part of the tiny usb stack.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief Error Header
|
||||
*
|
||||
* \note TBD
|
||||
*/
|
||||
|
||||
/** \ingroup Group_Common
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_FIFO_H_
|
||||
#define _TUSB_FIFO_H_
|
||||
|
||||
#include "common/common.h"
|
||||
|
||||
/* ToDo: Describe each field in fifo_t */
|
||||
typedef struct _fifo_t
|
||||
/**
|
||||
* \brief Simple FIFO
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint8_t* buf;
|
||||
uint16_t size;
|
||||
volatile uint16_t len;
|
||||
volatile uint16_t wr_ptr;
|
||||
volatile uint16_t rd_ptr;
|
||||
bool overwritable;
|
||||
IRQn_Type irq;
|
||||
uint8_t* buf; ///< buffer pointer
|
||||
uint16_t size; ///< buffer size
|
||||
volatile uint16_t len; ///< bytes in fifo
|
||||
volatile uint16_t wr_ptr; ///< write pointer
|
||||
volatile uint16_t rd_ptr; ///< read pointer
|
||||
bool overwritable; ///< allow overwrite data when full
|
||||
IRQn_Type irq; ///< interrupt used to lock fifo
|
||||
} fifo_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void fifo_init(fifo_t* f, uint8_t* buffer, uint16_t size, bool overwritable, IRQn_Type irq);
|
||||
bool fifo_write(fifo_t* f, uint8_t data);
|
||||
bool fifo_read(fifo_t* f, uint8_t *data);
|
||||
@@ -73,4 +90,8 @@ static inline uint16_t fifo_getLength(fifo_t* f)
|
||||
return f->len;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TUSB_FIFO_H_ */
|
||||
|
||||
Reference in New Issue
Block a user