File: file.h

package info (click to toggle)
syslinux 2:4.05+dfsg-6+deb7u1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 25,684 kB
  • sloc: ansic: 276,159; asm: 9,973; pascal: 9,907; perl: 3,492; makefile: 1,736; sh: 626; python: 266; xml: 39
file content (25 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef FILE_H
#define FILE_H

#include "mystuff.h"

struct serial_if {
    int port;
    void *pvt;
    void (*read) (struct serial_if *, void *, size_t);
    void (*write) (struct serial_if *, const void *, size_t);
};

struct file_info {
    const char *name;
    size_t base;
    size_t size;
    void *pvt;
};


int serial_init(struct serial_if *sif);
void serial_read(struct serial_if *sif, void *data, size_t n);
void serial_write(struct serial_if *sif, const void *data, size_t n);

#endif /* FILE_H */