Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions include/yalla/device/atmega1284/avr/avrconstants.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* @brief Definition of AVR specific constants
* @author Christian Menard
* @date 2015-02-05
*/

/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Christian Menard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#pragma once

#include <inttypes.hpp>

namespace yalla
{

/**
* A simple structure used to organize constants specified by the AVR ISA.
*/
struct AvrConstants
{
/// base address of the memory region reserved for I/O Registers
static constexpr size_t iommBase = 0x20;
/// upper bound of the memory region reserved for I/O Registers
static constexpr size_t iommTop = 0xff;
/// lowest SRAM address
static constexpr size_t ramBottom = 0x0100;
/// highest SRAM address
static constexpr size_t ramTop = 0x40ff;
/// Total RAM size in byte
static constexpr size_t ramSize = 16384;
};

} // namespace lunacy
33 changes: 33 additions & 0 deletions include/yalla/device/atmega1284/avr/io.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* @brief ATmega1284 IO register and bit definitions
* @author Christian Menard
* @date 2015-02-05
*/

/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Christian Menard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#pragma once

#include <../../io_atmega1284x.hpp>
55 changes: 55 additions & 0 deletions include/yalla/device/atmega1284p/avr/avrconstants.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* @brief Definition of AVR specific constants
* @author Christian Menard
* @date 2015-02-05
*/

/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Christian Menard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#pragma once

#include <inttypes.hpp>

namespace yalla
{

/**
* A simple structure used to organize constants specified by the AVR ISA.
*/
struct AvrConstants
{
/// base address of the memory region reserved for I/O Registers
static constexpr size_t iommBase = 0x20;
/// upper bound of the memory region reserved for I/O Registers
static constexpr size_t iommTop = 0xff;
/// lowest SRAM address
static constexpr size_t ramBottom = 0x0100;
/// highest SRAM address
static constexpr size_t ramTop = 0x40ff;
/// Total RAM size in byte
static constexpr size_t ramSize = 16384;
};

} // namespace lunacy
33 changes: 33 additions & 0 deletions include/yalla/device/atmega1284p/avr/io.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* @brief ATmega1284P IO register and bit definitions
* @author Christian Menard
* @date 2015-02-05
*/

/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Christian Menard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#pragma once

#include <../../io_atmega1284x.hpp>
55 changes: 55 additions & 0 deletions include/yalla/device/atmega164a/avr/avrconstants.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* @brief Definition of AVR specific constants
* @author Christian Menard
* @date 2015-02-05
*/

/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Christian Menard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#pragma once

#include <inttypes.hpp>

namespace yalla
{

/**
* A simple structure used to organize constants specified by the AVR ISA.
*/
struct AvrConstants
{
/// base address of the memory region reserved for I/O Registers
static constexpr size_t iommBase = 0x20;
/// upper bound of the memory region reserved for I/O Registers
static constexpr size_t iommTop = 0xff;
/// lowest SRAM address
static constexpr size_t ramBottom = 0x0100;
/// highest SRAM address
static constexpr size_t ramTop = 0x04ff;
/// Total RAM size in byte
static constexpr size_t ramSize = 1024;
};

} // namespace lunacy
33 changes: 33 additions & 0 deletions include/yalla/device/atmega164a/avr/io.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* @brief ATmega164A IO register and bit definitions
* @author Christian Menard
* @date 2015-02-05
*/

/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Christian Menard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#pragma once

#include <../../io_atmegax4xa.hpp>
55 changes: 55 additions & 0 deletions include/yalla/device/atmega164pa/avr/avrconstants.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* @brief Definition of AVR specific constants
* @author Christian Menard
* @date 2015-02-05
*/

/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Christian Menard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#pragma once

#include <inttypes.hpp>

namespace yalla
{

/**
* A simple structure used to organize constants specified by the AVR ISA.
*/
struct AvrConstants
{
/// base address of the memory region reserved for I/O Registers
static constexpr size_t iommBase = 0x20;
/// upper bound of the memory region reserved for I/O Registers
static constexpr size_t iommTop = 0xff;
/// lowest SRAM address
static constexpr size_t ramBottom = 0x0100;
/// highest SRAM address
static constexpr size_t ramTop = 0x04ff;
/// Total RAM size in byte
static constexpr size_t ramSize = 1024;
};

} // namespace lunacy
33 changes: 33 additions & 0 deletions include/yalla/device/atmega164pa/avr/io.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* @brief ATmega164AP IO register and bit definitions
* @author Christian Menard
* @date 2015-02-05
*/

/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Christian Menard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#pragma once

#include <../../io_atmegax4xa.hpp>
Loading