b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | /******************************************************************************
|
| 2 | *(C) Copyright 2014 Marvell International Ltd.
|
| 3 | * All Rights Reserved
|
| 4 | ******************************************************************************/
|
| 5 | /* -------------------------------------------------------------------------------------------------------------------
|
| 6 | *
|
| 7 | * Filename: main.c
|
| 8 | *
|
| 9 | * Authors:
|
| 10 | *
|
| 11 | * Description: gps main
|
| 12 | *
|
| 13 | * HISTORY:
|
| 14 | *
|
| 15 | * May 26, 2015 - Initial Version
|
| 16 | *
|
| 17 | * Notes:
|
| 18 | *
|
| 19 | ******************************************************************************/
|
| 20 |
|
| 21 | /******************************************************************************
|
| 22 | * Include files
|
| 23 | ******************************************************************************/
|
| 24 | #include <stdio.h>
|
| 25 | #include <stdlib.h>
|
| 26 | #include <unistd.h>
|
| 27 | #include "gps.h"
|
| 28 | #include "gps_utils.h"
|
| 29 |
|
| 30 | /******************************************************************************
|
| 31 | * Code
|
| 32 | ******************************************************************************/
|
| 33 |
|
| 34 | int main(int argc, char *argv[])
|
| 35 | {
|
| 36 | struct gps_context *gps;
|
| 37 |
|
| 38 | GPS_LOG_INIT();
|
| 39 | GPS_IMSG("gps version 0.1\n");
|
| 40 |
|
| 41 | gps = gps_init(argc, argv);
|
| 42 | if (!gps) {
|
| 43 | GPS_EMSG("gps init failed\n");
|
| 44 | exit(1);
|
| 45 | }
|
| 46 | gps_run(gps);
|
| 47 | gps_exit(gps);
|
| 48 |
|
| 49 | return 0;
|
| 50 | }
|