Avr8bit-emulator
An emulator for the Atmel AVR 8-bit microcontroller
Loading...
Searching...
No Matches
mcu_control.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "core.h"
Include dependency graph for mcu_control.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void break_point (struct CORE *core)
 Triggers a breakpoint in the MCU emulator.
 
void nop (struct CORE *core)
 Executes a no-operation instruction.
 
void sleep (struct CORE *core)
 Puts the MCU into sleep mode.
 
void wdr (struct CORE *core)
 Resets the watchdog timer.
 

Function Documentation

◆ break_point()

void break_point ( struct CORE core)

Triggers a breakpoint in the MCU emulator.

This function is used to simulate a breakpoint in the MCU emulator, halting execution for debugging purposes.

Currently, this function does nothing.

Parameters
corePointer to the CORE structure representing the MCU state.

Triggers a breakpoint in the MCU emulator.

Parameters
corePointer to the CORE structure
Returns
0

Definition at line 8 of file mcu_control.c.

8 {
9}

◆ nop()

void nop ( struct CORE core)

Executes a no-operation instruction.

This function simulates the execution of a NOP (no operation) instruction, which does nothing and simply advances the program counter.

Currently, this function does nothing.

Parameters
corePointer to the CORE structure representing the MCU state.

Definition at line 11 of file mcu_control.c.

11 {
12 // No operation
13 // 1 cycle
14}

◆ sleep()

void sleep ( struct CORE core)

Puts the MCU into sleep mode.

This function simulates putting the MCU into a low-power sleep mode, reducing power consumption until an interrupt occurs.

Currently, this function does nothing.

Parameters
corePointer to the CORE structure representing the MCU state.

Definition at line 16 of file mcu_control.c.

16 {
17 // Sleep
18 // 1 cycle
19}

◆ wdr()

void wdr ( struct CORE core)

Resets the watchdog timer.

This function simulates resetting the watchdog timer, preventing the MCU from resetting due to a watchdog timeout.

Currently, this function does nothing.

Parameters
corePointer to the CORE structure representing the MCU state.

Definition at line 21 of file mcu_control.c.

21 {
22 // Watchdog Reset
23 // 1 cycle
24}