Some comment patches
This commit is contained in:
parent
9cd66f6f77
commit
93adb7e944
@ -53,9 +53,9 @@ void spiBegin(void) {
|
||||
|
||||
#if NONE(SOFTWARE_SPI, FORCE_SOFT_SPI)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
// Hardware SPI
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
|
||||
// make sure SPCR rate is in expected bits
|
||||
#if (SPR0 != 0 || SPR1 != 1)
|
||||
@ -177,9 +177,9 @@ void spiBegin(void) {
|
||||
|
||||
#else // SOFTWARE_SPI || FORCE_SOFT_SPI
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
// Software SPI
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
|
||||
// nop to tune soft SPI timing
|
||||
#define nop asm volatile ("\tnop\n")
|
||||
|
@ -50,9 +50,9 @@
|
||||
|
||||
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
/// Interrupt handler for the TC0 channel 1.
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------
|
||||
void Servo_Handler(timer16_Sequence_t timer, Tc *pTc, uint8_t channel);
|
||||
|
||||
#ifdef _useTimer1
|
||||
|
@ -458,7 +458,7 @@ void udi_cdc_data_sof_notify(void)
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ------------------------
|
||||
//------- Internal routines to control serial line
|
||||
|
||||
static uint8_t udi_cdc_setup_to_port(void)
|
||||
@ -579,7 +579,7 @@ static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n,
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ------------------------
|
||||
//------- Internal routines to process data transfer
|
||||
|
||||
|
||||
@ -781,7 +781,7 @@ static void udi_cdc_tx_send(uint8_t port)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Application interface
|
||||
|
||||
|
||||
|
@ -457,7 +457,7 @@ uint8_t udi_msc_getsetting(void)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines to process CBW packet
|
||||
|
||||
static void udi_msc_cbw_invalid(void)
|
||||
@ -613,7 +613,7 @@ static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines to process small data packet
|
||||
|
||||
static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size)
|
||||
@ -645,7 +645,7 @@ static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines to process CSW packet
|
||||
|
||||
static void udi_msc_csw_process(void)
|
||||
@ -691,7 +691,7 @@ static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines manage sense data
|
||||
|
||||
static void udi_msc_clear_sense(void)
|
||||
@ -757,7 +757,7 @@ static void udi_msc_sense_command_invalid(void)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// ------------------------
|
||||
//------- Routines manage SCSI Commands
|
||||
|
||||
static void udi_msc_spc_requestsense(void)
|
||||
|
@ -506,7 +506,7 @@ static bool udd_ep_interrupt(void);
|
||||
//@}
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
// ------------------------
|
||||
//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
|
||||
|
||||
/**
|
||||
@ -1307,7 +1307,7 @@ void udd_test_mode_packet(void)
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
// ------------------------
|
||||
//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
|
||||
|
||||
static void udd_reset_ep_ctrl(void)
|
||||
@ -1729,7 +1729,7 @@ static bool udd_ctrl_interrupt(void)
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
// ------------------------
|
||||
//--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
|
||||
|
||||
#if (0 != USB_DEVICE_MAX_EP)
|
||||
|
@ -46,7 +46,7 @@
|
||||
#endif
|
||||
|
||||
// ------------------------
|
||||
// Externals
|
||||
// Externs
|
||||
// ------------------------
|
||||
|
||||
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
|
||||
@ -177,6 +177,7 @@ void HAL_adc_init() {
|
||||
// Calculate ADC characteristics (i.e., gain and offset factors for each attenuation level)
|
||||
for (int i = 0; i < ADC_ATTEN_MAX; i++) {
|
||||
esp_adc_cal_characterize(ADC_UNIT_1, (adc_atten_t)i, ADC_WIDTH_BIT_12, V_REF, &characteristics[i]);
|
||||
|
||||
// Change attenuation 100mV below the calibrated threshold
|
||||
thresholds[i] = esp_adc_cal_raw_to_voltage(4095, &characteristics[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user