Revision 1e5f7648 modules/aos_chconf.h

View differences:

modules/aos_chconf.h
36 36
/*===========================================================================*/
37 37
/**
38 38
 * @name System timers settings
39
 * @{
39 40
 */
40 41
/*===========================================================================*/
41 42

  
42
// These settings are specific to each module.
43
/**
44
 * @brief   System tick frequency.
45
 * @details Frequency of the system timer that drives the system ticks. This
46
 *          setting also defines the system tick time unit.
47
 */
48
#if !defined(CH_CFG_ST_FREQUENCY)
49
#define CH_CFG_ST_FREQUENCY                 1000000UL
50
#endif
51

  
52
/**
53
 * @brief   Time intervals data size.
54
 * @note    Allowed values are 16, 32 or 64 bits.
55
 */
56
#if !defined(CH_CFG_INTERVALS_SIZE)
57
#define CH_CFG_INTERVALS_SIZE               32
58
#endif
59

  
60
/**
61
 * @brief   Time types data size.
62
 * @note    Allowed values are 16 or 32 bits.
63
 */
64
#if !defined(CH_CFG_TIME_TYPES_SIZE)
65
#define CH_CFG_TIME_TYPES_SIZE              32
66
#endif
67

  
68
/**
69
 * @brief   Time delta constant for the tick-less mode.
70
 * @note    If this value is zero then the system uses the classic
71
 *          periodic tick. This value represents the minimum number
72
 *          of ticks that is safe to specify in a timeout directive.
73
 *          The value one is not valid, timeouts are rounded up to
74
 *          this value.
75
 */
76
#if !defined(CH_CFG_ST_TIMEDELTA)
77
#define CH_CFG_ST_TIMEDELTA                 20
78
#endif
79

  
80
/** @} */
43 81

  
44 82
/*===========================================================================*/
45 83
/**
......
244 282
#define CH_CFG_USE_MAILBOXES                FALSE
245 283

  
246 284
/**
247
 * @brief   I/O Queues APIs.
248
 * @details If enabled then the I/O queues APIs are included in the kernel.
249
 *
250
 * @note    The default is @p TRUE.
251
 */
252
#define CH_CFG_USE_QUEUES                   FALSE
253

  
254
/**
255 285
 * @brief   Core Memory Manager APIs.
256 286
 * @details If enabled then the core memory manager APIs are included
257 287
 *          in the kernel.
......
282 312
#define CH_CFG_USE_MEMPOOLS                 FALSE
283 313

  
284 314
/**
315
 * @brief  Objects FIFOs APIs.
316
 * @details If enabled then the objects FIFOs APIs are included
317
 *          in the kernel.
318
 *
319
 * @note    The default is @p TRUE.
320
 */
321
#if !defined(CH_CFG_USE_OBJ_FIFOS)
322
#define CH_CFG_USE_OBJ_FIFOS                FALSE
323
#endif
324

  
325
/**
285 326
 * @brief   Dynamic Threads APIs.
286 327
 * @details If enabled then the dynamic threads creation APIs are included
287 328
 *          in the kernel.
......
296 337

  
297 338
/*===========================================================================*/
298 339
/**
340
 * @name Objects factory options
341
 * @{
342
 */
343
/*===========================================================================*/
344

  
345
/**
346
 * @brief   Objects Factory APIs.
347
 * @details If enabled then the objects factory APIs are included in the
348
 *          kernel.
349
 *
350
 * @note    The default is @p FALSE.
351
 */
352
#if !defined(CH_CFG_USE_FACTORY)
353
#define CH_CFG_USE_FACTORY                  FALSE
354
#endif
355

  
356
/**
357
 * @brief   Maximum length for object names.
358
 * @details If the specified length is zero then the name is stored by
359
 *          pointer but this could have unintended side effects.
360
 */
361
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
362
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH     8
363
#endif
364

  
365
/**
366
 * @brief   Enables the registry of generic objects.
367
 */
368
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
369
#define CH_CFG_FACTORY_OBJECTS_REGISTRY     TRUE
370
#endif
371

  
372
/**
373
 * @brief   Enables factory for generic buffers.
374
 */
375
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
376
#define CH_CFG_FACTORY_GENERIC_BUFFERS      TRUE
377
#endif
378

  
379
/**
380
 * @brief   Enables factory for semaphores.
381
 */
382
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
383
#define CH_CFG_FACTORY_SEMAPHORES           TRUE
384
#endif
385

  
386
/**
387
 * @brief   Enables factory for mailboxes.
388
 */
389
#if !defined(CH_CFG_FACTORY_MAILBOXES)
390
#define CH_CFG_FACTORY_MAILBOXES            TRUE
391
#endif
392

  
393
/**
394
 * @brief   Enables factory for objects FIFOs.
395
 */
396
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
397
#define CH_CFG_FACTORY_OBJ_FIFOS            TRUE
398
#endif
399

  
400
/** @} */
401

  
402
/*===========================================================================*/
403
/**
299 404
 * @name Debug options
300 405
 * @{
301 406
 */
......
422 527
/*===========================================================================*/
423 528

  
424 529
/**
530
 * @brief   System structure extension.
531
 * @details User fields added to the end of the @p ch_system_t structure.
532
 */
533
#define CH_CFG_SYSTEM_EXTRA_FIELDS                                          \
534
  /* Add threads custom fields here.*/
535

  
536
/**
537
 * @brief   System initialization hook.
538
 * @details User initialization code added to the @p chSysInit() function
539
 *          just before interrupts are enabled globally.
540
 */
541
#define CH_CFG_SYSTEM_INIT_HOOK() {                                         \
542
  /* Add threads initialization code here.*/                                \
543
}
544

  
545
/**
425 546
 * @brief   Threads descriptor structure extension.
426 547
 * @details User fields added to the end of the @p thread_t structure.
427 548
 */
......
430 551

  
431 552
/**
432 553
 * @brief   Threads initialization hook.
433
 * @details User initialization code added to the @p chThdInit() API.
554
 * @details User initialization code added to the @p _thread_init() function.
434 555
 *
435
 * @note    It is invoked from within @p chThdInit() and implicitly from all
556
 * @note    It is invoked from within @p _thread_init() and implicitly from all
436 557
 *          the threads creation APIs.
437 558
 */
438 559
#define CH_CFG_THREAD_INIT_HOOK(tp) {                                       \
......
442 563
/**
443 564
 * @brief   Threads finalization hook.
444 565
 * @details User finalization code added to the @p chThdExit() API.
445
 *
446
 * @note    It is inserted into lock zone.
447
 * @note    It is also invoked when the threads simply return in order to
448
 *          terminate.
449 566
 */
450 567
#define CH_CFG_THREAD_EXIT_HOOK(tp) {                                       \
451 568
  /* Add threads finalization code here.*/                                  \
......
516 633
 *          the system is halted.
517 634
 */
518 635
#define CH_CFG_SYSTEM_HALT_HOOK(reason) {                                   \
519
  extern void aosPrintHaltErrorCode(const char* reason);                       \
520
  aosPrintHaltErrorCode(reason);                                               \
636
  extern void aosPrintHaltErrorCode(const char* reason);                    \
637
  aosPrintHaltErrorCode(reason);                                            \
521 638
}
522 639

  
523 640
/**
......
547 664
/*===========================================================================*/
548 665

  
549 666
/**
550
 * @brief   Flag to enable/disable floating point support in chprinf()
667
 * @brief   Flag to enable/disable floating point support in chprintf() and all deriviates.
551 668
 */
552 669
#define CHPRINTF_USE_FLOAT                  TRUE
553 670

  

Also available in: Unified diff