Apply suggestions from code review
Co-authored-by: Dan Halbert <halbert@halwitz.org>
This commit is contained in:
parent
3f419df3b6
commit
e839be5e4e
6 changed files with 8 additions and 6 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Renode is an emulator targeting microcontroller-class devices. This port is a
|
||||
minimal version of CircuitPython that runs under Renode. Renode is designed to
|
||||
mimic full microcontrollers but CP uses more registers than what Renode has
|
||||
mimic full microcontrollers but CP uses more peripherals than what Renode has
|
||||
implemented so far. This port allows us to run on a variety of CPUs without
|
||||
worrying about peripherals.
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
// This file is licensed under the MIT License.
|
||||
// Full license text is available in 'licenses/MIT.txt'.
|
||||
//
|
||||
// This is modified for CircuitPython to tick at 32khz like a slow external
|
||||
// This is modified for CircuitPython to tick at 32kHz like a slow external
|
||||
// crystal would.
|
||||
using System;
|
||||
using Antmicro.Renode.Core;
|
||||
|
|
@ -16,11 +16,11 @@ using System.Threading;
|
|||
|
||||
namespace Antmicro.Renode.Peripherals.Timers
|
||||
{
|
||||
public class Simple32Khz : IDoubleWordPeripheral, IKnownSize
|
||||
public class Simple32kHz : IDoubleWordPeripheral, IKnownSize
|
||||
{
|
||||
public long Size { get { return 0x4; } }
|
||||
|
||||
public Simple32Khz(IMachine machine)
|
||||
public Simple32kHz(IMachine machine)
|
||||
{
|
||||
machine.ClockSource.AddClockEntry(new ClockEntry(1, 32768, OnTick, this, String.Empty));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ sram: Memory.MappedMemory @ sysbus 0x20000000
|
|||
|
||||
uart: UART.PicoSoC_SimpleUART @ sysbus 0x40000000
|
||||
|
||||
time: Timers.Simple32Khz @ sysbus 0x40001000
|
||||
time: Timers.Simple32kHz @ sysbus 0x40001000
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ uint32_t common_hal_busio_uart_get_baudrate(busio_uart_obj_t *self) {
|
|||
}
|
||||
|
||||
void common_hal_busio_uart_set_baudrate(busio_uart_obj_t *self, uint32_t baudrate) {
|
||||
mp_raise_NotImplementedError(NULL);
|
||||
}
|
||||
|
||||
mp_float_t common_hal_busio_uart_get_timeout(busio_uart_obj_t *self) {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ uint32_t common_hal_mcu_processor_get_frequency(void) {
|
|||
}
|
||||
|
||||
void common_hal_mcu_processor_set_frequency(mcu_processor_obj_t *self, uint32_t frequency) {
|
||||
mp_raise_NotImplementedError(NULL);
|
||||
}
|
||||
|
||||
void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
extern uint32_t common_hal_mcu_processor_get_frequency(void);
|
||||
|
||||
void mp_hal_delay_us(mp_uint_t delay) {
|
||||
// busy_wait_us_32(delay);
|
||||
// TODO busy_wait_us_32(delay);
|
||||
}
|
||||
|
||||
void mp_hal_disable_all_interrupts(void) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue