iplemented 1st part of BBM...
Stefan Schuermans authored 12 years ago
|
1) /* flaneth - flash and ethernet
2) Copyright (C) 2007-2012 Stefan Schuermans <stefan@schuermans.info>
3) Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html
4) a BlinkenArea project - http://www.blinkenarea.org/ */
5)
6) #ifndef INC_apps_tools
7) #define INC_spps_tools
8)
9) #include "dosfs.h"
10)
11) /**
12) * @brief read string from file
13) * @param[in] sectorBuf scratch buffer to store a sector
14) * @param[in] vi volume information structure
15) * @param[in] filename name of file to read
16) * @param[out] buf buffer to put string to
17) * @param[in] sz size of buffer
18) * @return 0 on success, -1 on error
19) */
20) extern char AppsToolsReadStr(uint8_t sectorBuf[SECTOR_SIZE], VOLINFO *vi,
21) const char *filename, char *buf, unsigned int sz);
22)
23) /**
24) * @brief read MAC address from file
25) * @param[in] sectorBuf scratch buffer to store a sector
26) * @param[in] vi volume information structure
27) * @param[in] filename name of file to read
28) * @param[out] mac MAC address read
29) * @return 0 on success, -1 on error
30) */
31) extern char AppsToolsReadMac(uint8_t sectorBuf[SECTOR_SIZE], VOLINFO *vi,
32) const char *filename, unsigned char mac[6]);
33)
34) /**
35) * @brief read IP address from file
36) * @param[in] sectorBuf scratch buffer to store a sector
37) * @param[in] vi volume information structure
38) * @param[in] filename name of file to read
39) * @param[out] ip IP address read
40) * @return 0 on success, -1 on error
41) */
42) extern char AppsToolsReadIp(uint8_t sectorBuf[SECTOR_SIZE], VOLINFO *vi,
43) const char *filename, unsigned char ip[4]);
44)
|
added port number to BBM->M...
Stefan Schuermans authored 12 years ago
|
45) /**
46) * @brief read network port from file
47) * @param[in] sectorBuf scratch buffer to store a sector
48) * @param[in] vi volume information structure
49) * @param[in] filename name of file to read
50) * @param[out] port network port read
51) * @return 0 on success, -1 on error
52) */
53) extern char AppsToolsReadPort(uint8_t sectorBuf[SECTOR_SIZE], VOLINFO *vi,
54) const char *filename, unsigned short *port);
55)
|