mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-11-22 03:49:42 +01:00
* Accept and store float frequency values * Unify PLL resolver for 1366/1368/1370 Pick the closest frequency to the requested target. If there are multiple PLL settings, pick the one with first the lowest VDO frequency, and finally the lowest posdividers. Merged frequency ramp start and loop. This solves overshooting when requesting a target frequency within the current step size. It also eliminates the duplicate setting of the target frequency is that's on a step boundary. Cleaned up several unused defines. * Restore postdiv2 < postdiv1 condition for BM1368 and BM1370 * Whitespace * Clean up intermediate functions Simplify frequency_transition further, finally fix overshoot * Code cleanup * Add debug logging for BM1397 * Fix log * Flip postdiv condition for readability * Add test * Fix BM1370 fb_range * EOF line in test_pll.c
33 lines
956 B
C
33 lines
956 B
C
#ifndef BM1366_H_
|
|
#define BM1366_H_
|
|
|
|
#include "common.h"
|
|
#include "mining.h"
|
|
|
|
#define BM1366_SERIALTX_DEBUG false
|
|
#define BM1366_SERIALRX_DEBUG false
|
|
#define BM1366_DEBUG_WORK false //causes insane amount of debug output
|
|
#define BM1366_DEBUG_JOBS false //causes insane amount of debug output
|
|
|
|
typedef struct __attribute__((__packed__))
|
|
{
|
|
uint8_t job_id;
|
|
uint8_t num_midstates;
|
|
uint8_t starting_nonce[4];
|
|
uint8_t nbits[4];
|
|
uint8_t ntime[4];
|
|
uint8_t merkle_root[32];
|
|
uint8_t prev_block_hash[32];
|
|
uint8_t version[4];
|
|
} BM1366_job;
|
|
|
|
uint8_t BM1366_init(float frequency, uint16_t asic_count, uint16_t difficulty);
|
|
void BM1366_send_work(void * GLOBAL_STATE, bm_job * next_bm_job);
|
|
void BM1366_set_version_mask(uint32_t version_mask);
|
|
int BM1366_set_max_baud(void);
|
|
int BM1366_set_default_baud(void);
|
|
void BM1366_send_hash_frequency(float frequency);
|
|
task_result * BM1366_process_work(void * GLOBAL_STATE);
|
|
|
|
#endif /* BM1366_H_ */
|