#include <avr/io.h>
#include <stddef.h>
#include <util/atomic.h>
#include <avr/interrupt.h>
Go to the source code of this file.
#define cbi |
( |
|
port, |
|
|
|
nr |
|
) |
| (port&=~_BV(nr)) |
#define eRTK_MAX_OVERLOAD 0 |
#define ERTK_STACKSIZE 256 |
#define eRTK_STARTUP_MS 0 |
#define oIDLE |
( |
|
a | ) |
{ ( a ) ? sbi( PORTE, PE2 ) : cbi( PORTE, PE2 ); sbi( DDRE, PE2 ); } |
#define oIDLEfast |
( |
|
a | ) |
{ ( a ) ? sbi( PORTE, PE2 ) : cbi( PORTE, PE2 ); } |
#define sbi |
( |
|
port, |
|
|
|
nr |
|
) |
| (port|=_BV(nr)) |
Enumerator |
---|
SYS_NOTASK |
|
SYS_NULLPTR |
|
SYS_NULLTIMER |
|
SYS_OVERLOAD |
|
SYS_VERIFY |
|
SYS_UNKNOWN |
|
Definition at line 50 of file eRTK.h.
void __attribute__ |
( |
(naked) |
| ) |
|
Definition at line 115 of file eRTK.c.
128 if( p->
pnext!=NULL ) {
147 asm volatile (
"ret" );
void deadbeef(tsys reason)
void * stackptr[VANZTASK+1]
void deadbeef |
( |
tsys |
reason | ) |
|
void eRTK_get_sema |
( |
uint8_t |
semaid | ) |
|
Definition at line 309 of file eRTK.c.
311 while( xch( &sema[semaid], 1 ) ) {
void eRTK_wefet(uint8_t timeout)
void deadbeef(tsys reason)
uint8_t eRTK_GetTid |
( |
void |
| ) |
|
uint16_t eRTK_GetTimer16 |
( |
void |
| ) |
|
Definition at line 461 of file eRTK.c.
462 register uint16_t val;
463 ATOMIC_BLOCK( ATOMIC_RESTORESTATE ) {
uint8_t eRTK_GetTimer8 |
( |
void |
| ) |
|
Definition at line 151 of file eRTK.c.
158 asm volatile(
"ret" );
void deadbeef(tsys reason)
void * stackptr[VANZTASK+1]
Definition at line 371 of file eRTK.c.
372 uint8_t
n, prio, index;
392 char hit[VANZTASK+1];
393 memset( hit, 0,
sizeof hit );
394 for( task=1; task<VANZTASK+1; task++ ) {
397 for( n=1; n<VANZTASK+1; n++ ) {
398 if(
tcd[n].prio>=prio && !hit[n] ) {
407 for( n=0; n<VANZTASK+1; n++ ) {
408 for( uint16_t f=0; f<
ERTK_STACKSIZE/4; f++ ) memcpy( stack[n]+4*f,
"\xde\xad\xbe\xef", 4 );
416 void ( *task )( uint16_t param0,
void *param1 );
417 void ( *tvoid )( void );
418 void ( *tbeef )(
tsys );
420 memset( &taddr, 0,
sizeof taddr );
426 else taddr.tvoid=eRTK_Idle;
push r0 npush r1 npush r2 npush r3 npush r4 npush r5 npush r6 npush r7 npush r8 npush r9 npush r10 npush r11 npush r12 npush r13 npush r14 npush r15 npush r16 npush r17 npush r18 npush r19 npush r20 npush r21 npush r22 npush r23 npush r24 npush r25 npush r26 npush r27 npush r28 npush r29 npush r30 npush r31 n in __SP_L__ n sts r0 n in __SP_H__ n sts r0 n
void(* task)(uint16_t param0, void *param1)
void eRTK_SetReady(uint8_t tid)
void deadbeef(tsys reason)
const t_eRTK_tcb rom_tcb[VANZTASK]
void * stackptr[VANZTASK+1]
void eRTK_SetReady |
( |
uint8_t |
tid | ) |
|
Definition at line 238 of file eRTK.c.
243 ATOMIC_BLOCK( ATOMIC_RESTORESTATE ) {
246 if(
tcd[tid].prio > pthis->
prio || pthis->
pnext==NULL ) {
247 insertat( pthis, &
tcd[tid] );
250 }
while( ( pthis=pthis->
pnext ) );
void deadbeef(tsys reason)
void eRTK_SetSuspended |
( |
uint8_t |
tid | ) |
|
Definition at line 255 of file eRTK.c.
259 ATOMIC_BLOCK( ATOMIC_RESTORESTATE ) {
261 if( pthis->
tid==tid ) {
265 }
while( ( pthis=pthis->
pnext ) );
void deadbeef(tsys reason)
void eRTK_Sleep_ms |
( |
uint16_t |
ms | ) |
|
Definition at line 280 of file eRTK.c.
void eRTK_wefet(uint8_t timeout)
void eRTK_timer_init |
( |
void |
| ) |
|
Definition at line 515 of file eRTK.c.
516 #if defined (__AVR_ATmega2560__)
518 #elif defined (__AVR_ATxmega128A1U__)
void eRTK_WaitUntil |
( |
uint8_t |
then | ) |
|
Definition at line 469 of file eRTK.c.
uint8_t eRTK_GetTimer8(void)
void eRTK_wefet(uint8_t timeout)
void eRTK_wefet |
( |
uint8_t |
timeout | ) |
|
Definition at line 269 of file eRTK.c.
271 ATOMIC_BLOCK( ATOMIC_RESTORESTATE ) {
void deadbeef(tsys reason)
void eRTK_SetSuspended(uint8_t tid)