#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include "garmin.h"
#include "nmeagen.h"
#include "exifgen.h"
Include dependency graph for garminusb2exif.c:
Go to the source code of this file.
Data Structures | |
struct | Packet_t |
Defines | |
#define | GARMIN_HEADER_SIZE 12 |
#define | GARMIN_MAX_PKTSIZE 512 |
#define | PKTBUF_SIZE 4097 |
#define | D(x) x |
#define | EXIF_DEV "/dev/exif_meta" |
Functions | |
int | pktbuf_size () |
int | pktbuf_peek (char *buf, int n) |
int | pktbuf_deq (char *buf, int n) |
int | pktbuf_enq (char *buf, int n) |
int | sendpacket (Packet_t *pack) |
Packet_t * | recvpacket (void) |
void | garmin_pvton (void) |
void | garmin_privcmd (int fd) |
int | main (int argc, char *argv[]) |
Variables | |
int | gps_fd |
char | pktbuf [PKTBUF_SIZE] |
int | pktbuf_head = 0 |
int | pktbuf_tail = 0 |
D800_Pvt_Data_Type | lastpvt |
cpo_sat_data | lastsatdata [12] |
int | satdata_valid = 0 |
Definition at line 46 of file garminusb2exif.c.
#define EXIF_DEV "/dev/exif_meta" |
Definition at line 193 of file garminusb2exif.c.
#define GARMIN_HEADER_SIZE 12 |
#define GARMIN_MAX_PKTSIZE 512 |
#define PKTBUF_SIZE 4097 |
Definition at line 44 of file garminusb2exif.c.
Referenced by pktbuf_deq(), pktbuf_enq(), pktbuf_peek(), and pktbuf_size().
void garmin_privcmd | ( | int | fd | ) |
void garmin_pvton | ( | void | ) |
Definition at line 170 of file garminusb2exif.c.
References malloc(), Packet_t::mData, Packet_t::mDataSize, Packet_t::mPacketId, Packet_t::mPacketType, Packet_t::mReserved1, Packet_t::mReserved2, Packet_t::mReserved3, and sendpacket().
Referenced by main().
int main | ( | int | argc, | |
char * | argv[] | |||
) |
*************************************************************************** ! FILE NAME : autoexposure.c ! DESCRIPTION: Daemon to adjust camera exposure and white balance ! Copyright (C) 2008 Elphel, Inc. ! -----------------------------------------------------------------------------** ! This program is free software: you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** ! !
define X313_CHN_DISALL_D 0xaa0 // disable all channels, do not modify refresh or memory as a whole define X313_SDRAM_OFF_D 0xaaa // disable all chennels, refresh and memory itself define X313_SDRAM_ON_D 0xaaf // will disable all channels but refresh
test system memory - now - just for intereference, not a real memory test
allocate memory
deallocate memory
Definition at line 195 of file garminusb2exif.c.
References D, EXIF_DEV, exif_gen(), Exif_GPSInfo_GPSLatitudeRef, exif_init_meta(), exit, fd_exif, free(), garmin_privcmd(), garmin_pvton(), gps_fd, lastpvt, lastsatdata, Packet_t::mData, memcpy(), Packet_t::mPacketId, pktbuf_head, pktbuf_tail, recvpacket(), satdata_valid, SEEK_END, stderr, and write.
int pktbuf_deq | ( | char * | buf, | |
int | n | |||
) |
Definition at line 83 of file garminusb2exif.c.
References pktbuf, pktbuf_head, PKTBUF_SIZE, and pktbuf_tail.
Referenced by recvpacket().
int pktbuf_enq | ( | char * | buf, | |
int | n | |||
) |
Definition at line 95 of file garminusb2exif.c.
References pktbuf, PKTBUF_SIZE, pktbuf_size(), and pktbuf_tail.
Referenced by recvpacket().
int pktbuf_peek | ( | char * | buf, | |
int | n | |||
) |
Definition at line 71 of file garminusb2exif.c.
References pktbuf, pktbuf_head, PKTBUF_SIZE, and pktbuf_tail.
Referenced by recvpacket().
int pktbuf_size | ( | ) |
Definition at line 67 of file garminusb2exif.c.
References pktbuf_head, PKTBUF_SIZE, and pktbuf_tail.
Referenced by pktbuf_enq(), and recvpacket().
Packet_t* recvpacket | ( | void | ) |
Definition at line 122 of file garminusb2exif.c.
References free(), GARMIN_HEADER_SIZE, GARMIN_MAX_PKTSIZE, gps_fd, malloc(), pktbuf_deq(), pktbuf_enq(), pktbuf_peek(), pktbuf_size(), read, and stderr.
Referenced by main().
int sendpacket | ( | Packet_t * | pack | ) |
Definition at line 112 of file garminusb2exif.c.
References GARMIN_HEADER_SIZE, gps_fd, Packet_t::mDataSize, and write.
Referenced by garmin_pvton().
int gps_fd |
Definition at line 59 of file garminusb2exif.c.
Referenced by main(), recvpacket(), and sendpacket().
D800_Pvt_Data_Type lastpvt |
cpo_sat_data lastsatdata[12] |
char pktbuf[PKTBUF_SIZE] |
Definition at line 60 of file garminusb2exif.c.
Referenced by pktbuf_deq(), pktbuf_enq(), and pktbuf_peek().
int pktbuf_head = 0 |
Definition at line 61 of file garminusb2exif.c.
Referenced by main(), pktbuf_deq(), pktbuf_peek(), and pktbuf_size().
int pktbuf_tail = 0 |
Definition at line 61 of file garminusb2exif.c.
Referenced by main(), pktbuf_deq(), pktbuf_enq(), pktbuf_peek(), and pktbuf_size().
int satdata_valid = 0 |