Fixed bug 3482776.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.2.x@3933 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
017c51cdd1
commit
cf939786af
|
@ -31,7 +31,7 @@ PROJECT_NAME = ChibiOS/RT
|
||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 2.2.8
|
PROJECT_NUMBER = 2.2.9
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief Kernel version string.
|
* @brief Kernel version string.
|
||||||
*/
|
*/
|
||||||
#define CH_KERNEL_VERSION "2.2.8"
|
#define CH_KERNEL_VERSION "2.2.9"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Kernel version major number.
|
* @brief Kernel version major number.
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief Kernel version patch number.
|
* @brief Kernel version patch number.
|
||||||
*/
|
*/
|
||||||
#define CH_KERNEL_PATCH 8
|
#define CH_KERNEL_PATCH 9
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Common values.
|
* Common values.
|
||||||
|
|
|
@ -45,10 +45,15 @@
|
||||||
#ifndef _CHFILES_H_
|
#ifndef _CHFILES_H_
|
||||||
#define _CHFILES_H_
|
#define _CHFILES_H_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief No error return code.
|
||||||
|
*/
|
||||||
|
#define FILE_OK 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Error code from the file stream methods.
|
* @brief Error code from the file stream methods.
|
||||||
*/
|
*/
|
||||||
#define FILE_ERROR 0xFFFFFFFFUL
|
#define FILE_ERROR 0xFFFFFFFFUL
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief File offset type.
|
* @brief File offset type.
|
||||||
|
@ -69,7 +74,7 @@ typedef uint32_t fileoffset_t;
|
||||||
/* File get current position method.*/ \
|
/* File get current position method.*/ \
|
||||||
fileoffset_t (*getposition)(void *instance); \
|
fileoffset_t (*getposition)(void *instance); \
|
||||||
/* File seek method.*/ \
|
/* File seek method.*/ \
|
||||||
fileoffset_t (*lseek)(void *instance, fileoffset_t offset);
|
uint32_t (*lseek)(void *instance, fileoffset_t offset);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief @p BaseFileStream specific data.
|
* @brief @p BaseFileStream specific data.
|
||||||
|
@ -80,9 +85,11 @@ typedef uint32_t fileoffset_t;
|
||||||
_base_sequential_stream_data
|
_base_sequential_stream_data
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @extends BaseSequentialStreamVMT
|
||||||
|
*
|
||||||
* @brief @p BaseFileStream virtual methods table.
|
* @brief @p BaseFileStream virtual methods table.
|
||||||
*/
|
*/
|
||||||
struct BaseFilelStreamVMT {
|
struct BaseFileStreamVMT {
|
||||||
_base_file_stream_methods
|
_base_file_stream_methods
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,15 +101,22 @@ struct BaseFilelStreamVMT {
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/** @brief Virtual Methods Table.*/
|
/** @brief Virtual Methods Table.*/
|
||||||
const struct FileStreamVMT *vmt;
|
const struct BaseFileStreamVMT *vmt;
|
||||||
_base_file_stream_data
|
_base_file_stream_data
|
||||||
} BaseFileStream;
|
} BaseFileStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions (BaseFileStream)
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Base file Stream close.
|
* @brief Base file Stream close.
|
||||||
* @details The function closes a file stream.
|
* @details The function closes a file stream.
|
||||||
*
|
*
|
||||||
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
||||||
|
* @return The operation status.
|
||||||
|
* @retval FILE_OK no error.
|
||||||
|
* @retval FILE_ERROR operation failed.
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
@ -112,38 +126,45 @@ typedef struct {
|
||||||
* @brief Returns an implementation dependent error code.
|
* @brief Returns an implementation dependent error code.
|
||||||
*
|
*
|
||||||
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
||||||
|
* @return Implementation dependent error code.
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define chFileStreamGetError ((ip)->vmt->geterror(ip))
|
#define chFileStreamGetError(ip) ((ip)->vmt->geterror(ip))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the current file size.
|
* @brief Returns the current file size.
|
||||||
*
|
*
|
||||||
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
||||||
|
* @return The file size.
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define chFileStreamGetSize ((ip)->vmt->getposition(ip))
|
#define chFileStreamGetSize(ip) ((ip)->vmt->getposition(ip))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the current file pointer position.
|
* @brief Returns the current file pointer position.
|
||||||
*
|
*
|
||||||
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
||||||
|
* @return The current position inside the file.
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define chFileStreamGetPosition ((ip)->vmt->getposition(ip))
|
#define chFileStreamGetPosition(ip) ((ip)->vmt->getposition(ip))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Moves the file current pointer to an absolute position.
|
* @brief Moves the file current pointer to an absolute position.
|
||||||
*
|
*
|
||||||
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
* @param[in] ip pointer to a @p BaseFileStream or derived class
|
||||||
* @param[in] offset new absolute position
|
* @param[in] offset new absolute position
|
||||||
|
* @return The operation status.
|
||||||
|
* @retval FILE_OK no error.
|
||||||
|
* @retval FILE_ERROR operation failed.
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define chFileStreamSeek ((ip)->vmt->lseek(ip, offset))
|
#define chFileStreamSeek(ip, offset) ((ip)->vmt->lseek(ip, offset))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#endif /* _CHFILES_H_ */
|
#endif /* _CHFILES_H_ */
|
||||||
|
|
||||||
|
|
|
@ -63,11 +63,16 @@
|
||||||
+--testhal/ - HAL integration test demos.
|
+--testhal/ - HAL integration test demos.
|
||||||
+--STM32/ - STM32 HAL demos.
|
+--STM32/ - STM32 HAL demos.
|
||||||
+--STM8S/ - STM8S HAL demos.
|
+--STM8S/ - STM8S HAL demos.
|
||||||
|
+--tools - Various tools.
|
||||||
|
+--eclipse - Eclipse enhancements.
|
||||||
|
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
*** Releases ***
|
*** Releases ***
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
|
*** 2.2.9 ***
|
||||||
|
- FIX: Fixed Error in the BaseFileStream interface (bug 3482776).
|
||||||
|
|
||||||
*** 2.2.8 ***
|
*** 2.2.8 ***
|
||||||
- NEW: Added new API chThdExitS() in order to allow atomic operations on
|
- NEW: Added new API chThdExitS() in order to allow atomic operations on
|
||||||
thead exit.
|
thead exit.
|
||||||
|
|
Loading…
Reference in New Issue