mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 14:42:05 +00:00
Move includes to header
This commit is contained in:
parent
c3d8f775e1
commit
a22190f92f
@ -19,13 +19,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "ch341a_i2c.h"
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// extern struct libusb_device_handle *handle;
|
||||
unsigned char *readbuf;
|
||||
@ -151,7 +144,7 @@ int32_t ch341readEEPROM_param(uint8_t *buffer, uint32_t offset, uint32_t bytesto
|
||||
|
||||
if (ret < 0 || getnextpkt == -1) { // indicates an error
|
||||
printf("ret from libusb_handle_timeout = %d\n", ret);
|
||||
printf("getnextpkt = %d\n", getnextpkt);
|
||||
printf("getnextpkt = %u\n", getnextpkt);
|
||||
if (ret < 0)
|
||||
printf("USB read error : %s\n", strerror(-ret));
|
||||
libusb_free_transfer(xferBulkIn);
|
||||
|
@ -4,7 +4,13 @@
|
||||
#ifndef __CH341A_I2C_H__
|
||||
#define __CH341A_I2C_H__
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define BULK_WRITE_ENDPOINT 0x02 /* bEndpointAddress 0x02 EP 2 OUT (Bulk)*/
|
||||
#define BULK_READ_ENDPOINT 0x82 /* bEndpointAddress 0x82 EP 2 IN (Bulk)*/
|
||||
|
Loading…
Reference in New Issue
Block a user