source: UsbWattMeter/trunk/asp_dcre/kernel/alarm.h@ 164

Last change on this file since 164 was 164, checked in by coas-nagasima, 6 years ago

TOPPERS/ECNLサンプルアプリ「USB充電器電力計」を追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr
File size: 3.4 KB
Line 
1/*
2 * TOPPERS/ASP Kernel
3 * Toyohashi Open Platform for Embedded Real-Time Systems/
4 * Advanced Standard Profile Kernel
5 *
6 * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
7 * Toyohashi Univ. of Technology, JAPAN
8 * Copyright (C) 2005-2010 by Embedded and Real-Time Systems Laboratory
9 * Graduate School of Information Science, Nagoya Univ., JAPAN
10 *
11 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
12 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
13 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
14 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
15 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
16 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
17 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
18 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
19ƒƒ“ƒgi—˜—p
20 * ŽÒƒ}ƒjƒ…
21ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
22 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
23 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
24 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
25 * ‚ƁD
26 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
27ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
28ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
29 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
30 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
31 * •ñ‚·‚邱‚ƁD
32 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
33 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
34 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
35 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
36 * –Ɛӂ·‚邱‚ƁD
37 *
38 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
39 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
40 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
41 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
42 * ‚̐ӔC‚𕉂í‚È‚¢D
43 *
44 * @(#) $Id: alarm.h 164 2016-03-07 11:33:50Z coas-nagasima $
45 */
46
47/*
48 * ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰‹@”\
49 */
50
51#ifndef TOPPERS_ALARM_H
52#define TOPPERS_ALARM_H
53
54#include <queue.h>
55#include "time_event.h"
56
57/*
58 * ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰‰Šú‰»ƒuƒƒbƒN
59 */
60typedef struct alarm_handler_initialization_block {
61 ATR almatr; /* ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰‘®« */
62 intptr_t exinf; /* ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰‚ÌŠg’£î•ñ */
63 ALMHDR almhdr; /* ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰‚Ì‹N“®”Ô’n */
64} ALMINIB;
65
66/*
67 * ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰ŠÇ—ƒuƒƒbƒN
68 */
69typedef struct alarm_handler_control_block {
70 const ALMINIB *p_alminib; /* ‰Šú‰»ƒuƒƒbƒN‚ւ̃|ƒCƒ“ƒ^ */
71 bool_t almsta; /* ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰‚Ì“®ìó‘Ô */
72 TMEVTB tmevtb; /* ƒ^ƒCƒ€ƒCƒxƒ“ƒgƒuƒƒbƒN */
73} ALMCB;
74
75/*
76 * Žg—p‚µ‚Ä‚¢‚È‚¢ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰ŠÇ—ƒuƒƒbƒN‚̃ŠƒXƒg
77 */
78extern QUEUE free_almcb;
79
80/*
81 * ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰ID‚̍őå’likernel_cfg.cj
82 */
83extern const ID tmax_almid;
84extern const ID tmax_salmid;
85
86/*
87 * ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰‰Šú‰»ƒuƒƒbƒN‚̃GƒŠƒAikernel_cfg.cj
88 */
89extern const ALMINIB alminib_table[];
90extern ALMINIB aalminib_table[];
91
92/*
93 * ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰ŠÇ—ƒuƒƒbƒN‚̃GƒŠƒAikernel_cfg.cj
94 */
95extern ALMCB almcb_table[];
96
97/*
98 * ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰ŠÇ—ƒuƒƒbƒN‚©‚çƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰ID‚ðŽæ‚èo‚·‚½‚ß‚Ì
99 * ƒ}ƒNƒ
100 */
101#define ALMID(p_almcb) ((ID)(((p_almcb) - almcb_table) + TMIN_ALMID))
102
103/*
104 * ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰‹@”\‚̏‰Šú‰»
105 */
106extern void initialize_alarm(void);
107
108/*
109 * ƒAƒ‰[ƒ€ƒnƒ“ƒhƒ‰‹N“®ƒ‹[ƒ`ƒ“
110 */
111extern void call_almhdr(ALMCB *p_almcb);
112
113#endif /* TOPPERS_ALARM_H */
Note: See TracBrowser for help on using the repository browser.