Micriµm
Empowering Embedded Systems
µC/LIB
V1.19
User’s Manual
www.Micrium.com
Disclaimer
Specifications written in this manual are believed to be accurate, but are not guaranteed to
be entirely free of error. Specifications in this manual may be changed for functional or
performance improvements without notice. Please make sure your manual is the latest
edition. While the information herein is assumed to be accurate, Micrium assumes no
responsibility for any errors or omissions and makes no warranties. Micrium specifically
disclaims any implied warranty of fitness for a particular purpose.
Copyright notice
You may not extract portions of this manual or modify the PDF file in any way without the
prior written permission of Micrium. The software described in this document is furnished
under a license and may only be used or copied in accordance with the terms of such a
license.
© 2004-2006 Micriµm, Weston, Florida 33327-1848, U.S.A.
Trademarks
Names mentioned in this manual may be trademarks of their respective companies. Brand
and product names are trademarks or registered trademarks of their respective holders.
Registration
Please register the software via email. This way we can make sure you will receive updates
or notifications of updates as soon as they become available. For registration please
provide the following information:
• Your full name and the name of your supervisor
• Your company name
• Your job title
• Your email address and telephone number
• Company name and address
• Your company's main phone number
• Your company's web site address
• Name and version of the product
Please send this information to:
licensing@micrium.com
Contact address
Micrium
949 Crestview Circle
Weston, FL 33327-1848
U.S.A.
Phone : +1 954 217 2036
FAX : +1 954 217 2037
WEB :
www.micrium.com
Email : support@micrium.com
2
Manual versions
If you find any errors in this document, please inform us and we will make the appropriate
corrections for future releases.
Manual Version Date By Description
V1.18 2005/08/30 ITJ Manual Created
V1.19 2006/04/25 JJL Updated
3
Table Of Contents
Introduction................................................................................................................................6
I.1 Portable.............................................................................................................................................6
I.2 Configurable .....................................................................................................................................6
I.3 Coding Standards..............................................................................................................................6
I.4 MISRA C ..........................................................................................................................................6
I.5 Safety Critical Certification ..............................................................................................................7
I.6 µC/LIB Limitations.........................................................................................................................7
Getting Started with µC/LIB...............................................................................................8
1.00 Installing µC/LIB............................................................................................................................8
µC/LIB Constant and Macro Library.............................................................................11
2.00.01 Boolean Constants...........................................................................................................................11
2.00.02 Bit Constants...................................................................................................................................11
2.00.03 Octet Constants ...............................................................................................................................11
2.00.04 Integer Constants ............................................................................................................................11
2.00.05 Time Constants ...............................................................................................................................12
2.10 Macros ............................................................................................................................................13
2.10.01.01 DEF_BIT()......................................................................................................................................13
2.10.01.02 DEF_BIT_MASK() ........................................................................................................................14
2.10.01.03 DEF_BIT_FIELD().........................................................................................................................15
2.10.01.04 DEF_BIT_SET().............................................................................................................................16
2.10.01.05 DEF_BIT_CLR() ............................................................................................................................17
2.10.01.06 DEF_BIT_IS_SET() .......................................................................................................................18
2.10.01.07 DEF_BIT_IS_CLR().......................................................................................................................19
2.10.01.08 DEF_BIT_IS_SET_ANY().............................................................................................................20
2.10.01.09 DEF_BIT_IS_CLR_ANY()............................................................................................................21
2.10.02.01 DEF_MIN().....................................................................................................................................22
2.10.02.02 DEF_MAX()...................................................................................................................................23
2.10.02.03 DEF_ABS().....................................................................................................................................24
4
µC/LIB Memory Library.......................................................................................................25
3.00 µC/LIB Memory Library Configuration .......................................................................................25
3.10.01 Mem_Clr() ......................................................................................................................................26
3.10.02 Mem_Set() ......................................................................................................................................27
3.10.03 Mem_Copy()...................................................................................................................................28
3.10.04 Mem_Cmp()....................................................................................................................................29
3.20 µC/LIB Memory Library Optimization.........................................................................................30
3.20.01 Mem_Copy() Optimization.............................................................................................................30
µC/LIB String Library ...........................................................................................................31
4.00 µC/LIB String Library Configuration ...........................................................................................31
4.10.01 Str_Len().........................................................................................................................................32
4.10.02 Str_Copy().......................................................................................................................................33
4.10.03 Str_Cat()..........................................................................................................................................34
4.10.04 Str_Cmp() .......................................................................................................................................35
4.10.05 Str_Cmp_N()...................................................................................................................................36
4.10.06 Str_Char() .......................................................................................................................................37
4.10.07 Str_Char_Last()...............................................................................................................................38
4.10.08 Str_Str() ..........................................................................................................................................39
4.10.09 Str_FmtNbr_32().............................................................................................................................40
µC/LIB Licensing Policy .....................................................................................................42
5
评论2
最新资源