subrascasse

Sub Rascasse: an iPhone dive log for Subsurface cloud storage, with a pure-Swift git client (GPL-2.0)
git clone https://git.schurger.org/subrascasse.git
Log | Files | Refs | README | LICENSE

ihex.h (1530B)


      1 /*
      2  * libdivecomputer
      3  *
      4  * Copyright (C) 2013 Jef Driesen
      5  *
      6  * This library is free software; you can redistribute it and/or
      7  * modify it under the terms of the GNU Lesser General Public
      8  * License as published by the Free Software Foundation; either
      9  * version 2.1 of the License, or (at your option) any later version.
     10  *
     11  * This library is distributed in the hope that it will be useful,
     12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     14  * Lesser General Public License for more details.
     15  *
     16  * You should have received a copy of the GNU Lesser General Public
     17  * License along with this library; if not, write to the Free Software
     18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
     19  * MA 02110-1301 USA
     20  */
     21 
     22 #ifndef DC_IHEX_H
     23 #define DC_IHEX_H
     24 
     25 #include <libdivecomputer/common.h>
     26 #include <libdivecomputer/context.h>
     27 
     28 #ifdef __cplusplus
     29 extern "C" {
     30 #endif /* __cplusplus */
     31 
     32 typedef struct dc_ihex_file_t dc_ihex_file_t;
     33 
     34 typedef struct dc_ihex_entry_t {
     35 	unsigned int type;
     36 	unsigned int address;
     37 	unsigned int length;
     38 	unsigned char data[255];
     39 } dc_ihex_entry_t;
     40 
     41 dc_status_t
     42 dc_ihex_file_open (dc_ihex_file_t **file, dc_context_t *context, const char *filename);
     43 
     44 dc_status_t
     45 dc_ihex_file_read (dc_ihex_file_t *file, dc_ihex_entry_t *entry);
     46 
     47 dc_status_t
     48 dc_ihex_file_reset (dc_ihex_file_t *file);
     49 
     50 dc_status_t
     51 dc_ihex_file_close (dc_ihex_file_t *file);
     52 
     53 #ifdef __cplusplus
     54 }
     55 #endif /* __cplusplus */
     56 #endif /* DC_IHEX_H */