diff --git a/include/yalla/device/atmega1284/avr/avrconstants.hpp b/include/yalla/device/atmega1284/avr/avrconstants.hpp new file mode 100644 index 0000000..4c1881b --- /dev/null +++ b/include/yalla/device/atmega1284/avr/avrconstants.hpp @@ -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 + +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 diff --git a/include/yalla/device/atmega1284/avr/io.hpp b/include/yalla/device/atmega1284/avr/io.hpp new file mode 100644 index 0000000..835a89d --- /dev/null +++ b/include/yalla/device/atmega1284/avr/io.hpp @@ -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> diff --git a/include/yalla/device/atmega1284p/avr/avrconstants.hpp b/include/yalla/device/atmega1284p/avr/avrconstants.hpp new file mode 100644 index 0000000..4c1881b --- /dev/null +++ b/include/yalla/device/atmega1284p/avr/avrconstants.hpp @@ -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 + +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 diff --git a/include/yalla/device/atmega1284p/avr/io.hpp b/include/yalla/device/atmega1284p/avr/io.hpp new file mode 100644 index 0000000..fe62751 --- /dev/null +++ b/include/yalla/device/atmega1284p/avr/io.hpp @@ -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> diff --git a/include/yalla/device/atmega164a/avr/avrconstants.hpp b/include/yalla/device/atmega164a/avr/avrconstants.hpp new file mode 100644 index 0000000..82bc88f --- /dev/null +++ b/include/yalla/device/atmega164a/avr/avrconstants.hpp @@ -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 + +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 diff --git a/include/yalla/device/atmega164a/avr/io.hpp b/include/yalla/device/atmega164a/avr/io.hpp new file mode 100644 index 0000000..cb8bd7b --- /dev/null +++ b/include/yalla/device/atmega164a/avr/io.hpp @@ -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> diff --git a/include/yalla/device/atmega164pa/avr/avrconstants.hpp b/include/yalla/device/atmega164pa/avr/avrconstants.hpp new file mode 100644 index 0000000..82bc88f --- /dev/null +++ b/include/yalla/device/atmega164pa/avr/avrconstants.hpp @@ -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 + +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 diff --git a/include/yalla/device/atmega164pa/avr/io.hpp b/include/yalla/device/atmega164pa/avr/io.hpp new file mode 100644 index 0000000..48c122e --- /dev/null +++ b/include/yalla/device/atmega164pa/avr/io.hpp @@ -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> diff --git a/include/yalla/device/atmega324a/avr/avrconstants.hpp b/include/yalla/device/atmega324a/avr/avrconstants.hpp new file mode 100644 index 0000000..380ef4e --- /dev/null +++ b/include/yalla/device/atmega324a/avr/avrconstants.hpp @@ -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 + +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 = 0x08ff; + /// Total RAM size in byte + static constexpr size_t ramSize = 2048; +}; + +} // namespace lunacy diff --git a/include/yalla/device/atmega324a/avr/io.hpp b/include/yalla/device/atmega324a/avr/io.hpp new file mode 100644 index 0000000..586e90b --- /dev/null +++ b/include/yalla/device/atmega324a/avr/io.hpp @@ -0,0 +1,33 @@ +/** + * @brief ATmega324A 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> diff --git a/include/yalla/device/atmega324pa/avr/avrconstants.hpp b/include/yalla/device/atmega324pa/avr/avrconstants.hpp new file mode 100644 index 0000000..380ef4e --- /dev/null +++ b/include/yalla/device/atmega324pa/avr/avrconstants.hpp @@ -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 + +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 = 0x08ff; + /// Total RAM size in byte + static constexpr size_t ramSize = 2048; +}; + +} // namespace lunacy diff --git a/include/yalla/device/atmega324pa/avr/io.hpp b/include/yalla/device/atmega324pa/avr/io.hpp new file mode 100644 index 0000000..18b7a66 --- /dev/null +++ b/include/yalla/device/atmega324pa/avr/io.hpp @@ -0,0 +1,33 @@ +/** + * @brief ATmega324PA 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> diff --git a/include/yalla/device/atmega644a/avr/avrconstants.hpp b/include/yalla/device/atmega644a/avr/avrconstants.hpp new file mode 100644 index 0000000..f5bfde1 --- /dev/null +++ b/include/yalla/device/atmega644a/avr/avrconstants.hpp @@ -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 + +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 = 0x10ff; + /// Total RAM size in byte + static constexpr size_t ramSize = 4096; +}; + +} // namespace lunacy diff --git a/include/yalla/device/atmega644a/avr/io.hpp b/include/yalla/device/atmega644a/avr/io.hpp new file mode 100644 index 0000000..81e9ccb --- /dev/null +++ b/include/yalla/device/atmega644a/avr/io.hpp @@ -0,0 +1,33 @@ +/** + * @brief ATmega644A 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> diff --git a/include/yalla/device/atmega644pa/avr/avrconstants.hpp b/include/yalla/device/atmega644pa/avr/avrconstants.hpp new file mode 100644 index 0000000..f5bfde1 --- /dev/null +++ b/include/yalla/device/atmega644pa/avr/avrconstants.hpp @@ -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 + +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 = 0x10ff; + /// Total RAM size in byte + static constexpr size_t ramSize = 4096; +}; + +} // namespace lunacy diff --git a/include/yalla/device/atmega644pa/avr/io.hpp b/include/yalla/device/atmega644pa/avr/io.hpp new file mode 100644 index 0000000..2091af0 --- /dev/null +++ b/include/yalla/device/atmega644pa/avr/io.hpp @@ -0,0 +1,33 @@ +/** + * @brief ATmega644PA 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> diff --git a/include/yalla/device/io_atmega1284x.hpp b/include/yalla/device/io_atmega1284x.hpp new file mode 100644 index 0000000..108ab95 --- /dev/null +++ b/include/yalla/device/io_atmega1284x.hpp @@ -0,0 +1,37 @@ +/** + * @brief Common ATmega1284(P) IO register and bit definitions + * @author Hannes Ellinger + * @author Christian Menard + * @date 2015-02-05 + */ + +/* + * The MIT License (MIT) + * + * Copyright (c) 2015 Hannes Ellinger + * 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> + +// TODO add additional register definitions diff --git a/include/yalla/device/io_atmegax4xa.hpp b/include/yalla/device/io_atmegax4xa.hpp new file mode 100644 index 0000000..0ff143d --- /dev/null +++ b/include/yalla/device/io_atmegax4xa.hpp @@ -0,0 +1,36 @@ +/** + * @brief Common ATmegaX4(P)A IO register and bit definitions + * @author Hannes Ellinger + * @author Christian Menard + * @date 2015-02-05 + */ + +/* + * The MIT License (MIT) + * + * Copyright (c) 2015 Hannes Ellinger + * 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 + +// TODO add register definitions + diff --git a/supported_devices.py b/supported_devices.py index 1fa58c2..f10972e 100644 --- a/supported_devices.py +++ b/supported_devices.py @@ -4,4 +4,12 @@ # ################################################################################ -list = ['atmega8'] +list = ['atmega8', + 'atmega164a', + 'atmega164pa', + 'atmega324a', + 'atmega324pa', + 'atmega644a', + 'atmega644pa', + 'atmega1284', + 'atmega1284p']