Some comment patches

This commit is contained in:
Scott Lahteine 2019-07-20 14:40:49 -05:00
parent 9cd66f6f77
commit 93adb7e944
6 changed files with 19 additions and 18 deletions

View file

@ -53,9 +53,9 @@ void spiBegin(void) {
#if NONE(SOFTWARE_SPI, FORCE_SOFT_SPI) #if NONE(SOFTWARE_SPI, FORCE_SOFT_SPI)
//------------------------------------------------------------------------------ // ------------------------
// Hardware SPI // Hardware SPI
//------------------------------------------------------------------------------ // ------------------------
// make sure SPCR rate is in expected bits // make sure SPCR rate is in expected bits
#if (SPR0 != 0 || SPR1 != 1) #if (SPR0 != 0 || SPR1 != 1)
@ -177,9 +177,9 @@ void spiBegin(void) {
#else // SOFTWARE_SPI || FORCE_SOFT_SPI #else // SOFTWARE_SPI || FORCE_SOFT_SPI
//------------------------------------------------------------------------------ // ------------------------
// Software SPI // Software SPI
//------------------------------------------------------------------------------ // ------------------------
// nop to tune soft SPI timing // nop to tune soft SPI timing
#define nop asm volatile ("\tnop\n") #define nop asm volatile ("\tnop\n")

View file

@ -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) 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. /// Interrupt handler for the TC0 channel 1.
//------------------------------------------------------------------------------ // ------------------------
void Servo_Handler(timer16_Sequence_t timer, Tc *pTc, uint8_t channel); void Servo_Handler(timer16_Sequence_t timer, Tc *pTc, uint8_t channel);
#ifdef _useTimer1 #ifdef _useTimer1

View file

@ -458,7 +458,7 @@ void udi_cdc_data_sof_notify(void)
} }
//------------------------------------------------- // ------------------------
//------- Internal routines to control serial line //------- Internal routines to control serial line
static uint8_t udi_cdc_setup_to_port(void) 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 //------- Internal routines to process data transfer
@ -781,7 +781,7 @@ static void udi_cdc_tx_send(uint8_t port)
} }
//--------------------------------------------- // ------------------------
//------- Application interface //------- Application interface

View file

@ -457,7 +457,7 @@ uint8_t udi_msc_getsetting(void)
} }
//--------------------------------------------- // ------------------------
//------- Routines to process CBW packet //------- Routines to process CBW packet
static void udi_msc_cbw_invalid(void) 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 //------- Routines to process small data packet
static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size) 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 //------- Routines to process CSW packet
static void udi_msc_csw_process(void) 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 //------- Routines manage sense data
static void udi_msc_clear_sense(void) static void udi_msc_clear_sense(void)
@ -757,7 +757,7 @@ static void udi_msc_sense_command_invalid(void)
} }
//--------------------------------------------- // ------------------------
//------- Routines manage SCSI Commands //------- Routines manage SCSI Commands
static void udi_msc_spc_requestsense(void) static void udi_msc_spc_requestsense(void)

View file

@ -506,7 +506,7 @@ static bool udd_ep_interrupt(void);
//@} //@}
//-------------------------------------------------------- // ------------------------
//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS //--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
/** /**
@ -1307,7 +1307,7 @@ void udd_test_mode_packet(void)
//-------------------------------------------------------- // ------------------------
//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT //--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
static void udd_reset_ep_ctrl(void) 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 //--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
#if (0 != USB_DEVICE_MAX_EP) #if (0 != USB_DEVICE_MAX_EP)

View file

@ -46,7 +46,7 @@
#endif #endif
// ------------------------ // ------------------------
// Externals // Externs
// ------------------------ // ------------------------
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED; 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) // Calculate ADC characteristics (i.e., gain and offset factors for each attenuation level)
for (int i = 0; i < ADC_ATTEN_MAX; i++) { 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]); 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 // Change attenuation 100mV below the calibrated threshold
thresholds[i] = esp_adc_cal_raw_to_voltage(4095, &characteristics[i]); thresholds[i] = esp_adc_cal_raw_to_voltage(4095, &characteristics[i]);
} }