/ libbitfury.h
libbitfury.h
1 /* 2 * Copyright 2014 Con Kolivas 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU General Public License as published by the Free 6 * Software Foundation; either version 3 of the License, or (at your option) 7 * any later version. See COPYING for more details. 8 */ 9 10 #ifndef LIBBITFURY_H 11 #define LIBBITFURY_H 12 #include "miner.h" 13 #include "driver-bitfury.h" 14 15 void ms3steps(uint32_t *p); 16 uint32_t decnonce(uint32_t in); 17 void bitfury_work_to_payload(struct bitfury_payload *p, struct work *work); 18 void spi_config_reg(struct bitfury_info *info, int cfgreg, int ena); 19 void spi_set_freq(struct bitfury_info *info); 20 void spi_send_conf(struct bitfury_info *info); 21 void spi_send_init(struct bitfury_info *info); 22 void spi_clear_buf(struct bitfury_info *info); 23 void spi_add_buf(struct bitfury_info *info, const void *buf, const int sz); 24 void spi_add_break(struct bitfury_info *info); 25 void spi_add_fasync(struct bitfury_info *info, int n); 26 void spi_add_data(struct bitfury_info *info, uint16_t addr, const void *buf, int len); 27 bool spi_reset(struct cgpu_info *bitfury, struct bitfury_info *info); 28 bool mcp_spi_txrx(struct cgpu_info *bitfury, struct bitfury_info *info); 29 bool ftdi_spi_txrx(struct cgpu_info *bitfury, struct bitfury_info *info); 30 bool bitfury_checkresults(struct thr_info *thr, struct work *work, uint32_t nonce); 31 bool libbitfury_sendHashData(struct thr_info *thr, struct cgpu_info *bitfury, 32 struct bitfury_info *info, int chip_n); 33 34 #endif /* LIBBITFURY_H */