OSDN Git Service

Step 10 added.
[kozos-expbrd/kozos_expbrd.git] / firm / junk / tools / kz_h8write / mot.h
1 /**
2  * @file mot.h
3  * @author Shinichiro Nakamura
4  * @brief motファイルモジュールのインターフェース定義。
5  */
6
7 /*
8  *
9  * ===============================================================
10  *  mot file interface library
11  *  Version 0.0.3
12  * ===============================================================
13  * Copyright (c) 2010-2011 Shinichiro Nakamura
14  *
15  * Permission is hereby granted, free of charge, to any person
16  * obtaining a copy of this software and associated documentation
17  * files (the "Software"), to deal in the Software without
18  * restriction, including without limitation the rights to use,
19  * copy, modify, merge, publish, distribute, sublicense, and/or
20  * sell copies of the Software, and to permit persons to whom the
21  * Software is furnished to do so, subject to the following
22  * conditions:
23  *
24  * The above copyright notice and this permission notice shall be
25  * included in all copies or substantial portions of the Software.
26  *
27  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
29  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
31  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
32  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
33  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
34  * OTHER DEALINGS IN THE SOFTWARE.
35  * ===============================================================
36  */
37
38 #ifndef MOT_H
39 #define MOT_H
40
41 typedef struct {
42     void (*cb_data)(const unsigned int addr, const unsigned char *buf, const int siz);
43 } mot_t;
44
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48
49 /**
50  * @brief motファイルを読み込む。
51  *
52  * @param filename ファイル名。(NULLを与えると標準入力を入力とする。)
53  * @param p mot構造体。(コールバック関数などの情報を参照する。)
54  *
55  * @retval 0 成功
56  * @retval 0以外 エラー番号。
57  */
58 int mot_read(const char *filename, mot_t *p);
59
60 #ifdef __cplusplus
61 }
62 #endif
63
64 #endif
65