More renaming.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10716 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
3864014e03
commit
85621dde08
|
@ -294,6 +294,15 @@
|
|||
*/
|
||||
#define CH_CFG_USE_MEMPOOLS TRUE
|
||||
|
||||
/**
|
||||
* @brief Objects factory APIs.
|
||||
* @details If enabled then the objects factory APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_FACTORY TRUE
|
||||
|
||||
/**
|
||||
* @brief Dynamic Threads APIs.
|
||||
* @details If enabled then the dynamic threads creation APIs are included
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
* @brief Enables factory for generic objects.
|
||||
* @note Generic objects require the heap allocator.
|
||||
*/
|
||||
#if !defined(CH_CFG_FACTORY_GENERIC) || defined(__DOXYGEN__)
|
||||
#define CH_CFG_FACTORY_GENERIC TRUE
|
||||
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFER) || defined(__DOXYGEN__)
|
||||
#define CH_CFG_FACTORY_GENERIC_BUFFER TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -70,7 +70,7 @@
|
|||
((CH_CFG_FACTORY_SEMAPHORES == TRUE))
|
||||
|
||||
#define CH_FACTORY_REQUIRES_HEAP \
|
||||
((CH_CFG_FACTORY_GENERIC == TRUE))
|
||||
((CH_CFG_FACTORY_GENERIC_BUFFER == TRUE))
|
||||
|
||||
#if (CH_CFG_FACTORY_MAX_NAMES_LENGHT < 0) || \
|
||||
(CH_CFG_FACTORY_MAX_NAMES_LENGHT > 32)
|
||||
|
@ -123,7 +123,7 @@ typedef struct ch_dyn_list {
|
|||
dyn_element_t *next;
|
||||
} dyn_list_t;
|
||||
|
||||
#if (CH_CFG_FACTORY_GENERIC == TRUE) || defined(__DOXIGEN__)
|
||||
#if (CH_CFG_FACTORY_GENERIC_BUFFER == TRUE) || defined(__DOXIGEN__)
|
||||
/**
|
||||
* @brief Type of a dynamic semaphore.
|
||||
*/
|
||||
|
@ -160,12 +160,12 @@ typedef struct ch_dyn_semaphore {
|
|||
* @brief Type of the factory main object.
|
||||
*/
|
||||
typedef struct ch_objects_factory {
|
||||
#if (CH_CFG_FACTORY_GENERIC == TRUE) || defined(__DOXIGEN__)
|
||||
#if (CH_CFG_FACTORY_GENERIC_BUFFER == TRUE) || defined(__DOXIGEN__)
|
||||
/**
|
||||
* @brief List of the allocated objects.
|
||||
*/
|
||||
dyn_list_t obj_list;
|
||||
#endif /* CH_CFG_FACTORY_GENERIC = TRUE */
|
||||
#endif /* CH_CFG_FACTORY_GENERIC_BUFFER = TRUE */
|
||||
#if (CH_CFG_FACTORY_SEMAPHORES == TRUE) || defined(__DOXIGEN__)
|
||||
/**
|
||||
* @brief List of the allocated semaphores.
|
||||
|
@ -196,7 +196,7 @@ extern "C" {
|
|||
void _factory_init(void);
|
||||
// dyn_registered_object_t *chFactoryRegisterObject(const char *name,
|
||||
// void *objp);
|
||||
#if (CH_CFG_FACTORY_GENERIC == TRUE) || defined(__DOXIGEN__)
|
||||
#if (CH_CFG_FACTORY_GENERIC_BUFFER == TRUE) || defined(__DOXIGEN__)
|
||||
dyn_buffer_t *chFactoryCreateBuffer(const char *name, size_t size);
|
||||
dyn_buffer_t *chFactoryFindBuffer(const char *name);
|
||||
void chFactoryReleaseBuffer(dyn_buffer_t *dbp);
|
||||
|
@ -231,7 +231,7 @@ static inline dyn_element_t *chFactoryDuplicateReferenceI(dyn_element_t *dep) {
|
|||
return dep;
|
||||
}
|
||||
|
||||
#if (CH_CFG_FACTORY_GENERIC == TRUE) || defined(__DOXIGEN__)
|
||||
#if (CH_CFG_FACTORY_GENERIC_BUFFER == TRUE) || defined(__DOXIGEN__)
|
||||
/**
|
||||
* @brief Returns the size of a generic dynamic buffer object.
|
||||
*
|
||||
|
|
|
@ -119,7 +119,7 @@ static dyn_element_t *dyn_list_unlink(dyn_list_t *dlp, dyn_element_t *element) {
|
|||
*/
|
||||
void _factory_init(void) {
|
||||
|
||||
#if CH_CFG_FACTORY_GENERIC == TRUE
|
||||
#if CH_CFG_FACTORY_GENERIC_BUFFER == TRUE
|
||||
dyn_list_init(&ch_factory.obj_list);
|
||||
#endif
|
||||
#if CH_CFG_FACTORY_SEMAPHORES == TRUE
|
||||
|
@ -130,7 +130,7 @@ void _factory_init(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if (CH_CFG_FACTORY_GENERIC == TRUE) || defined(__DOXIGEN__)
|
||||
#if (CH_CFG_FACTORY_GENERIC_BUFFER == TRUE) || defined(__DOXIGEN__)
|
||||
/**
|
||||
* @brief Creates a generic dynamic buffer object.
|
||||
* @post A reference to the buffer object is returned and the reference
|
||||
|
@ -247,7 +247,7 @@ void chFactoryReleaseBuffer(dyn_buffer_t *dbp) {
|
|||
|
||||
chSysUnlock();
|
||||
}
|
||||
#endif /* CH_CFG_FACTORY_GENERIC = TRUE */
|
||||
#endif /* CH_CFG_FACTORY_GENERIC_BUFFER = TRUE */
|
||||
|
||||
#if (CH_CFG_FACTORY_SEMAPHORES == TRUE) || defined(__DOXIGEN__)
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue