Skip to content

Commit af899cf

Browse files
committed
Update syntax 11_07a and ref_app
1 parent e553f61 commit af899cf

52 files changed

Lines changed: 944 additions & 349 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/chapter11_07a/src/math/checksums/crc/crc32.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2007 - 2019.
2+
// Copyright Christopher Kormanyos 2007 - 2025.
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)
66
//
77

8-
#ifndef CRC32_2015_01_26_H_
9-
#define CRC32_2015_01_26_H_
8+
#ifndef CRC32_2015_01_26_H
9+
#define CRC32_2015_01_26_H
1010

1111
#include <array>
1212
#include <cstdint>
@@ -63,4 +63,4 @@
6363

6464
} } } // namespace math::checksums::crc
6565

66-
#endif // CRC32_2015_01_26_H_
66+
#endif // CRC32_2015_01_26_H

examples/chapter11_07a/src/math/checksums/hash/hash_base.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2013 - 2023.
2+
// Copyright Christopher Kormanyos 2013 - 2025.
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)
66
//
77

8-
#ifndef HASH_BASE_2013_09_05_H_
9-
#define HASH_BASE_2013_09_05_H_
8+
#ifndef HASH_BASE_2013_09_05_H
9+
#define HASH_BASE_2013_09_05_H
1010

1111
#include <limits>
1212

@@ -139,6 +139,13 @@
139139
);
140140
}
141141

142+
auto hash(const std::uint8_t* message, const count_type count) -> void
143+
{
144+
this->initialize();
145+
this->process(message, count);
146+
this->finalize();
147+
}
148+
142149
protected:
143150
using message_block_type = std::array<std::uint8_t, static_cast<std::size_t>(MessageBufferSize)>;
144151

@@ -186,4 +193,4 @@
186193

187194
} } } // namespace math::checksums::hash
188195

189-
#endif // HASH_BASE_2013_09_05_H_
196+
#endif // HASH_BASE_2013_09_05_H

examples/chapter11_07a/src/math/checksums/hash/hash_detail.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// Copyright Christopher Kormanyos 2013 - 2023.
1+
// Copyright Christopher Kormanyos 2013 - 2025.
22
// Distributed under the Boost Software License,
33
// Version 1.0. (See accompanying file LICENSE_1_0.txt
44
// or copy at http://www.boost.org/LICENSE_1_0.txt)
55
//
66

7-
#ifndef HASH_DETAIL_2020_05_18_H_
8-
#define HASH_DETAIL_2020_05_18_H_
7+
#ifndef HASH_DETAIL_2020_05_18_H
8+
#define HASH_DETAIL_2020_05_18_H
99

1010
#include <cstddef>
1111
#include <cstdint>
@@ -126,4 +126,4 @@
126126

127127
} } } } // namespace math::checksums::hash::detail
128128

129-
#endif // HASH_DETAIL_2020_05_18_H_
129+
#endif // HASH_DETAIL_2020_05_18_H

examples/chapter11_07a/src/math/checksums/hash/hash_sha1.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2013 - 2023.
2+
// Copyright Christopher Kormanyos 2013 - 2025.
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)
66
//
77

8-
#ifndef HASH_SHA1_2013_09_03_H_
9-
#define HASH_SHA1_2013_09_03_H_
8+
#ifndef HASH_SHA1_2013_09_03_H
9+
#define HASH_SHA1_2013_09_03_H
1010

1111
// See also: https://en.wikipedia.org/wiki/SHA-1
1212

@@ -146,4 +146,4 @@
146146

147147
} } } // namespace math::checksums::hash
148148

149-
#endif // HASH_SHA1_2013_09_03_H_
149+
#endif // HASH_SHA1_2013_09_03_H

examples/chapter11_07a/src/math/checksums/hash/hash_sha256.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2013 - 2023.
2+
// Copyright Christopher Kormanyos 2013 - 2025.
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)
66
//
77

8-
#ifndef HASH_SHA256_2023_02_26_H_
9-
#define HASH_SHA256_2023_02_26_H_
8+
#ifndef HASH_SHA256_2023_02_26_H
9+
#define HASH_SHA256_2023_02_26_H
1010

1111
// See also: https://en.wikipedia.org/wiki/SHA-2
1212

@@ -239,4 +239,4 @@
239239

240240
} } } // namespace math::checksums::hash
241241

242-
#endif // HASH_SHA256_2023_02_26_H_
242+
#endif // HASH_SHA256_2023_02_26_H

examples/chapter11_07a/src/math/pi_spigot/pi_spigot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
(std::min)
282282
(
283283
static_cast<local_count_type>(n_loop),
284-
static_cast<local_count_type>(std::tuple_size<output_chars_array_type>::value)
284+
static_cast<local_count_type>(std::tuple_size_v<output_chars_array_type>)
285285
)
286286
};
287287

examples/chapter11_07a/src/mcal/avr/mcal_lcd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2020 - 2024.
2+
// Copyright Christopher Kormanyos 2020 - 2025.
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)

examples/chapter11_07a/src/mcal/avr/mcal_spi_types.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2024
2+
// Copyright Christopher Kormanyos 2024 - 2025
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,25 +16,25 @@
1616

1717
namespace sram {
1818

19-
// Pin 1 on SRAM chip.
19+
// portd.7 (connect to pin 1 on SRAM chip).
2020
using port_pin_sram_csn0_type = mcal::port::port_pin<std::uint8_t,
2121
std::uint8_t,
2222
mcal::reg::portd,
2323
UINT8_C(7)>;
2424

25-
// Pin 2 on SRAM chip.
25+
// portd.6 (connect to pin 2 on SRAM chip).
2626
using port_pin_sram_miso_type = mcal::port::port_pin<std::uint8_t,
2727
std::uint8_t,
2828
mcal::reg::portd,
2929
UINT8_C(6)>;
3030

31-
// Pin 6 on SRAM chip.
31+
// portd.5 (connect to pin 6 on SRAM chip).
3232
using port_pin_sram_sck__type = mcal::port::port_pin<std::uint8_t,
3333
std::uint8_t,
3434
mcal::reg::portd,
3535
UINT8_C(5)>;
3636

37-
// Pin 5 on SRAM chip.
37+
// portd.4 (connect to pin 5 on SRAM chip).
3838
using port_pin_sram_mosi_type = mcal::port::port_pin<std::uint8_t,
3939
std::uint8_t,
4040
mcal::reg::portd,

examples/chapter11_07a/src/mcal_lcd/mcal_lcd_base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2020 - 2024.
2+
// Copyright Christopher Kormanyos 2020 - 2025.
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)

examples/chapter11_07a/src/mcal_lcd/mcal_lcd_buffered_instance.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2024.
2+
// Copyright Christopher Kormanyos 2024 - 2025.
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)

0 commit comments

Comments
 (0)