hw_ostc.h (1852B)
1 /* 2 * libdivecomputer 3 * 4 * Copyright (C) 2009 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_HW_OSTC_H 23 #define DC_HW_OSTC_H 24 25 #include "common.h" 26 #include "device.h" 27 #include "datetime.h" 28 #include "buffer.h" 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif /* __cplusplus */ 33 34 #define HW_OSTC_MD2HASH_SIZE 18 35 #define HW_OSTC_EEPROM_SIZE 256 36 37 typedef enum hw_ostc_format_t { 38 HW_OSTC_FORMAT_RAW, 39 HW_OSTC_FORMAT_RGB16, 40 HW_OSTC_FORMAT_RGB24 41 } hw_ostc_format_t; 42 43 dc_status_t 44 hw_ostc_device_md2hash (dc_device_t *device, unsigned char data[], unsigned int size); 45 46 dc_status_t 47 hw_ostc_device_eeprom_read (dc_device_t *device, unsigned int bank, unsigned char data[], unsigned int size); 48 49 dc_status_t 50 hw_ostc_device_eeprom_write (dc_device_t *device, unsigned int bank, const unsigned char data[], unsigned int size); 51 52 dc_status_t 53 hw_ostc_device_reset (dc_device_t *device); 54 55 dc_status_t 56 hw_ostc_device_screenshot (dc_device_t *device, dc_buffer_t *buffer, hw_ostc_format_t format); 57 58 dc_status_t 59 hw_ostc_device_fwupdate (dc_device_t *abstract, const char *filename); 60 61 #ifdef __cplusplus 62 } 63 #endif /* __cplusplus */ 64 #endif /* DC_HW_OSTC_H */