summaryrefslogtreecommitdiff
path: root/driver_oncore.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-01-19 20:03:47 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-01-19 20:03:47 -0500
commitc22430b526bf35912aba88dcb249264530cd5128 (patch)
tree89801f03d3b834f68a08d24789e84fcb4e2ff7c2 /driver_oncore.c
parent901d73928207e94b22e7edcf88df064590161eb6 (diff)
downloadgpsd-c22430b526bf35912aba88dcb249264530cd5128.tar.gz
Added a driver-type flags member to the driver method structure.
All regression tests pass.
Diffstat (limited to 'driver_oncore.c')
-rw-r--r--driver_oncore.c46
1 files changed, 17 insertions, 29 deletions
diff --git a/driver_oncore.c b/driver_oncore.c
index 7069cf7e..0f40c6a9 100644
--- a/driver_oncore.c
+++ b/driver_oncore.c
@@ -520,41 +520,29 @@ static gps_mask_t oncore_parse_input(struct gps_device_t *session)
/* This is everything we export */
/* *INDENT-OFF* */
const struct gps_type_t oncore_binary = {
- /* Full name of type */
- .type_name = "oncore binary",
- /* associated lexer packet type */
- .packet_type = ONCORE_PACKET,
- /* Response string that identifies device (not active) */
- .trigger = NULL,
- /* Number of satellite channels supported by the device */
- .channels = 12,
- /* Startup-time device detector */
- .probe_detect = NULL,
- /* Wakeup to be done before each baud hunt */
- .get_packet = generic_get,
- /* Parse message packets */
- .parse_packet = oncore_parse_input,
- /* RTCM handler (using default routine) */
- .rtcm_writer = pass_rtcm,
- /* Fire on various lifetime events */
- .event_hook = oncore_event_hook,
+
+ .type_name = "oncore binary", /* Full name of type */
+ .packet_type = ONCORE_PACKET, /* numeric packet type */
+ .flags = DRIVER_NOFLAGS, /* no flags set */
+ .trigger = NULL, /* identifying response */
+ .channels = 12, /* device channel count */
+ .probe_detect = NULL, /* no probe */
+ .get_packet = generic_get, /* packet getter */
+ .parse_packet = oncore_parse_input, /* packet parser */
+ .rtcm_writer = pass_rtcm, /* device accepts RTCM */
+ .event_hook = oncore_event_hook, /* lifetime event hook */
#ifdef ALLOW_RECONFIGURE
- /* Speed (baudrate) switch */
- .speed_switcher = oncore_set_speed,
- /* Switch to NMEA mode */
- .mode_switcher = oncore_set_mode,
- /* Message delivery rate switcher (not active) */
- .rate_switcher = NULL,
- /* Minimum cycle time of the device */
- .min_cycle = 1,
- /* Undo actions at configure_event time */
+ .speed_switcher = oncore_set_speed, /* no speed setter */
+ .mode_switcher = oncore_set_mode, /* no mode setter */
+ .rate_switcher = NULL, /* no speed setter */
+ .min_cycle = 1, /* 1Hz */
#endif /* ALLOW_RECONFIGURE */
#ifdef ALLOW_CONTROLSEND
/* Control string sender - should provide checksum and headers/trailer */
- .control_send = oncore_control_send,
+ .control_send = oncore_control_send, /* to send control strings */
#endif /* ALLOW_CONTROLSEND */
#ifdef NTPSHM_ENABLE
- .ntp_offset = oncore_ntp_offset,
+ .ntp_offset = oncore_ntp_offset, /* NTP offset array */
#endif /* NTPSHM_ENABLE */
};
/* *INDENT-ON* */