From: NIIBE Yutaka Date: Mon, 18 Feb 2013 06:45:42 +0000 (+0900) Subject: Update by Gnuk X-Git-Tag: release/0.06~7 X-Git-Url: http://git.gniibe.org/gitweb/?p=gnuk%2Fneug.git;a=commitdiff_plain;h=a4041cf5eb060c1f6146093b7bef77e7c5b227f5 Update by Gnuk --- diff --git a/ChangeLog b/ChangeLog index 68a0a3a..6c4354c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2013-02-18 Niibe Yutaka + + * src/random.c (noise_source_cnt_max_reset, noise_source_error): + Remove LED I/O. + + * src/adc_stm32f103.c (ADC_SMPR2_SMP_AN9, ADC_CHANNEL_IN9): New. + + * src/neug.h (neug_prng_reseed): Remove. + + * chibios: Update. + 2013-02-07 Niibe Yutaka * Version 0.05. diff --git a/src/adc_stm32f103.c b/src/adc_stm32f103.c index 02de8f1..8566968 100644 --- a/src/adc_stm32f103.c +++ b/src/adc_stm32f103.c @@ -41,6 +41,7 @@ #define ADC_SMPR2_SMP_AN0(n) ((n) << 0) #define ADC_SMPR2_SMP_AN1(n) ((n) << 3) #define ADC_SMPR2_SMP_AN2(n) ((n) << 6) +#define ADC_SMPR2_SMP_AN9(n) ((n) << 27) #define ADC_SQR1_NUM_CH(n) (((n) - 1) << 20) @@ -54,6 +55,7 @@ #define ADC_CHANNEL_IN0 0 #define ADC_CHANNEL_IN1 1 #define ADC_CHANNEL_IN2 2 +#define ADC_CHANNEL_IN9 9 #define ADC_CHANNEL_IN10 10 #define ADC_CHANNEL_IN11 11 #define ADC_CHANNEL_SENSOR 16 diff --git a/src/neug.h b/src/neug.h index 20b56dc..04a223b 100644 --- a/src/neug.h +++ b/src/neug.h @@ -17,7 +17,6 @@ extern uint16_t neug_p64_max; extern uint16_t neug_p4k_max; void neug_init (uint32_t *buf, uint8_t size); -void neug_prng_reseed (void); uint32_t neug_get (int kick); int neug_get_nonblock (uint32_t *p); void neug_kick_filling (void); diff --git a/src/random.c b/src/random.c index 7eaadcc..e426da5 100644 --- a/src/random.c +++ b/src/random.c @@ -230,13 +230,6 @@ static void noise_source_cnt_max_reset (void) { neug_err_cnt = neug_err_cnt_rc = neug_err_cnt_p64 = neug_err_cnt_p4k = 0; neug_rc_max = neug_p64_max = neug_p4k_max = 0; - -#if defined(BOARD_FST_01) - palClearPad (IOPORT1, 2); -#endif -#if defined(BOARD_STBEE_MINI) - palSetPad (IOPORT1, GPIOA_LED2); -#endif } static void noise_source_error_reset (void) @@ -255,13 +248,6 @@ static void noise_source_error (uint32_t err) neug_err_cnt_p64++; if ((err & ADAPTIVE_PROPORTION_4096)) neug_err_cnt_p4k++; - -#if defined(BOARD_FST_01) - palSetPad (IOPORT1, 2); -#endif -#if defined(BOARD_STBEE_MINI) - palClearPad (IOPORT1, GPIOA_LED2); -#endif } /*