Fix NeuG for CRC module clock setting.

This commit is contained in:
NIIBE Yutaka
2017-11-17 15:47:22 +09:00
parent e417846408
commit bb9b31166f
2 changed files with 11 additions and 0 deletions

View File

@@ -30,6 +30,7 @@
#include "sys.h"
#include "neug.h"
#ifndef GNU_LINUX_EMULATION
#include "mcu/stm32.h"
#include "mcu/stm32f103.h"
#endif
#include "adc.h"
@@ -143,6 +144,12 @@ rbit (uint32_t v)
asm ("rbit %0, %1" : "=r" (r) : "r" (v));
return r;
}
void
crc32_rv_stop (void)
{
RCC->AHBENR &= ~RCC_AHBENR_CRCEN;
}
#endif
static chopstx_mutex_t mode_mtx;
@@ -894,6 +901,7 @@ neug_fini (void)
rng_should_terminate = 1;
neug_get (1);
chopstx_join (rng_thread, NULL);
crc32_rv_stop ();
}
void