Книга: Advanced PIC Microcontroller Projects in C

10.5.1 Preparing for RTOS

10.5.1 Preparing for RTOS

In addition to the preceding functions, the #use rtos() preprocessor command must be specified at the beginning of the program before calling any of the RTOS functions. The format of this preprocessor command is:

#use rtos (timer=n, minor_cycle=m)

where timer is between 0 and 4 and specifies the processor timer that will be used by the RTOS, and minor_cycle is the longest time any task will run. The number entered here must be followed by s, ms, us, or ns.

In addition, a statistics option can be specified after the minor_cycle option, in which case the compiler will keep track of the minimum and maximum processor times the task uses at each call and the task’s total time used.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.653. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз