kopia lustrzana https://github.com/cnlohr/lolra
Bump
rodzic
1940782c3d
commit
ae63b4208f
|
@ -9,6 +9,9 @@ EXTRA_CFLAGS:=-I../rv003usb/lib -I../rv003usb/rv003usb -mstrict-align -Wno-unuse
|
||||||
|
|
||||||
include ../ch32v003fun/ch32v003fun/ch32v003fun.mk
|
include ../ch32v003fun/ch32v003fun/ch32v003fun.mk
|
||||||
|
|
||||||
|
programmerclock :
|
||||||
|
$(MINICHLINK)/minichlink -X ECLK 1:0:0:8:3
|
||||||
|
|
||||||
flash : cv_flash
|
flash : cv_flash
|
||||||
clean : cv_clean
|
clean : cv_clean
|
||||||
rm -rf rf_data_gen chirpbuff.dat chirpbuff.h chirpbuffinfo.h
|
rm -rf rf_data_gen chirpbuff.dat chirpbuff.h chirpbuffinfo.h
|
||||||
|
|
|
@ -68,7 +68,6 @@ volatile uint16_t adc_buffer[ADC_BUFFSIZE];
|
||||||
|
|
||||||
void SetupADC()
|
void SetupADC()
|
||||||
{
|
{
|
||||||
|
|
||||||
// Reset the ADC to init all regs
|
// Reset the ADC to init all regs
|
||||||
RCC->APB2PRSTR |= RCC_APB2Periph_ADC1;
|
RCC->APB2PRSTR |= RCC_APB2Periph_ADC1;
|
||||||
RCC->APB2PRSTR &= ~RCC_APB2Periph_ADC1;
|
RCC->APB2PRSTR &= ~RCC_APB2Periph_ADC1;
|
||||||
|
@ -277,25 +276,17 @@ int main()
|
||||||
|
|
||||||
SetupADC();
|
SetupADC();
|
||||||
|
|
||||||
|
while(1)
|
||||||
#if 0
|
|
||||||
// turn on the op-amp
|
|
||||||
EXTEN->EXTEN_CTR |= EXTEN_OPA_EN;
|
|
||||||
|
|
||||||
// select op-amp pos pin: 0 = PA2, 1 = PD7
|
|
||||||
EXTEN->EXTEN_CTR |= EXTEN_OPA_PSEL;
|
|
||||||
|
|
||||||
// select op-amp neg pin: 0 = PA1, 1 = PD0
|
|
||||||
EXTEN->EXTEN_CTR |= EXTEN_OPA_NSEL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
printf( "ADC Setup\n" );
|
printf( "ADC Setup\n" );
|
||||||
|
|
||||||
SetupTimer1();
|
#if 0
|
||||||
|
EXTEN->EXTEN_CTR |= EXTEN_OPA_EN; // turn on the op-amp
|
||||||
|
EXTEN->EXTEN_CTR |= EXTEN_OPA_PSEL; // select op-amp pos pin: 0 = PA2, 1 = PD7
|
||||||
|
EXTEN->EXTEN_CTR |= EXTEN_OPA_NSEL; // select op-amp neg pin: 0 = PA1, 1 = PD0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// SetupTimer1();
|
||||||
printf( "Timer 1 setup\n" );
|
printf( "Timer 1 setup\n" );
|
||||||
|
|
||||||
InnerLoop();
|
InnerLoop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue