mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-11-19 18:37:20 +01:00
- Extract BM##_set_job_difficulty_mask into a single function - Set self_test difficulty before ASIC_init to eliminate ASIC_set_job_difficulty_mask - Fixed some capitalisations of GLOBAL_STATE and some others - Thermal.c: pass DEVICE_CONFIG by pointer instead of by value
22 lines
544 B
C
22 lines
544 B
C
#ifndef COMMON_H_
|
|
#define COMMON_H_
|
|
|
|
#include <stdint.h>
|
|
#include "esp_err.h"
|
|
|
|
typedef struct __attribute__((__packed__))
|
|
{
|
|
uint8_t job_id;
|
|
uint32_t nonce;
|
|
uint32_t rolled_version;
|
|
} task_result;
|
|
|
|
unsigned char _reverse_bits(unsigned char num);
|
|
int _largest_power_of_two(int num);
|
|
|
|
int count_asic_chips(uint16_t asic_count, uint16_t chip_id, int chip_id_response_length);
|
|
esp_err_t receive_work(uint8_t * buffer, int buffer_size);
|
|
void get_difficulty_mask(uint16_t difficulty, uint8_t *job_difficulty_mask);
|
|
|
|
#endif /* COMMON_H_ */
|