diff options
author | Keith Packard <keithp@keithp.com> | 2008-12-20 23:30:06 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-12-20 23:30:06 -0800 |
commit | f7d49868aeae80d515b12a7e339628f1296754a6 (patch) | |
tree | 9c319fdf24e8f919df2b8466187f06c0ab81b76c /lib/cccp.c | |
parent | 30f23f23a6db3d12fdc9c088cf6ab47c5e5077fb (diff) |
Cleanup work; separating out the cp interface to be more abstract.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'lib/cccp.c')
-rw-r--r-- | lib/cccp.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -98,3 +98,15 @@ cccp_fini(struct ccdbg *dbg) cccp_write(dbg, 0xf, 0xf); dbg->clock = 1; } + +cccp_open() +{ + dbg->fd = open("/dev/ttyUSB0", 2); + if (dbg->fd < 0) { + perror(file); + free(dbg); + return NULL; + } + cccp_init(dbg); + cccp_write(dbg, CC_CLOCK, CC_CLOCK); +} |