Files
ESP-Miner/components/asic/include/common.h
mutatrum 1cf656b411 Several refactors and cleanups (#1102)
- 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
2025-07-05 20:58:58 -04:00

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_ */