# This function will convert the given STM32F030 register to its address.
function (value_map value value_return)
    if (${value} STREQUAL "GPIOA")
        set(${value_return} 0x48000000 CACHE INTERNAL "" FORCE)
    elseif (${value} STREQUAL "GPIOB")
        set(${value_return} 0x48000400 CACHE INTERNAL "" FORCE)
    elseif (${value} STREQUAL "GPIOC")
        set(${value_return} 0x48000800 CACHE INTERNAL "" FORCE)
    elseif (${value} STREQUAL "GPIOD")
        set(${value_return} 0x48000C00 CACHE INTERNAL "" FORCE)
    elseif (${value} STREQUAL "GPIOE")
        set(${value_return} 0x48001000 CACHE INTERNAL "" FORCE)
    elseif (${value} STREQUAL "GPIOF")
        set(${value_return} 0x48001400 CACHE INTERNAL "" FORCE)
    else ()
        message(FATAL_ERROR "Unknown AVR register ${value}.")
    endif ()
endfunction ()