Skip to content

Commit 1b4a966

Browse files
committed
byte -> uint8_t
1 parent 1f42cb8 commit 1b4a966

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

speeduino/page_crc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "page_crc.h"
33
#include "pages.h"
44

5-
uint32_t __attribute__((optimize("Os"))) calculatePageCRC32(byte pageNum)
5+
uint32_t __attribute__((optimize("Os"))) calculatePageCRC32(uint8_t pageNum)
66
{
77
FastCRC32 crcCalc;
88

speeduino/page_crc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
/*
55
* Calculates and returns the CRC32 value of a given page of memory
66
*/
7-
uint32_t calculatePageCRC32(byte pageNum /**< [in] The page number to compute CRC for. */);
7+
uint32_t calculatePageCRC32(uint8_t pageNum /**< [in] The page number to compute CRC for. */);

speeduino/pages.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ static page_iterator_t map_page_offset_to_entity(uint8_t pageNumber, uint16_t of
395395

396396
// ====================================== External functions ====================================
397397

398-
uint16_t getPageSize(byte pageNum)
398+
uint16_t getPageSize(uint8_t pageNum)
399399
{
400400
page_iterator_t entity = map_page_offset_to_entity(pageNum, UINT16_MAX);
401401
return entity.address.start + entity.address.size;
@@ -406,14 +406,14 @@ static inline uint16_t pageOffsetToEntityOffset(const page_iterator_t &entity, u
406406
return pageOffset-entity.address.start;
407407
}
408408

409-
bool setPageValue(byte pageNum, uint16_t offset, byte value)
409+
bool setPageValue(uint8_t pageNum, uint16_t offset, byte value)
410410
{
411411
page_iterator_t entity = map_page_offset_to_entity(pageNum, offset);
412412

413413
return setEntityValue(entity, pageOffsetToEntityOffset(entity, offset), value);
414414
}
415415

416-
byte getPageValue(byte pageNum, uint16_t offset)
416+
byte getPageValue(uint8_t pageNum, uint16_t offset)
417417
{
418418
page_iterator_t entity = map_page_offset_to_entity(pageNum, offset);
419419

@@ -424,7 +424,7 @@ byte getPageValue(byte pageNum, uint16_t offset)
424424
// No need to have coverage on simple wrappers
425425

426426
// Support iteration over a pages entities.
427-
page_iterator_t page_begin(byte pageNum)
427+
page_iterator_t page_begin(uint8_t pageNum)
428428
{
429429
return map_page_offset_to_entity(pageNum, 0U);
430430
}

speeduino/pages.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Page size in bytes
77
*/
8-
uint16_t getPageSize(byte pageNum /**< [in] The page number */ );
8+
uint16_t getPageSize(uint8_t pageNum /**< [in] The page number */ );
99

1010
// These are the page numbers that the Tuner Studio serial protocol uses to transverse the different map and config pages.
1111
constexpr uint8_t veMapPage = 2;
@@ -29,7 +29,7 @@ constexpr uint8_t MAX_PAGE_NUM = (boostvvtPage2+1U);
2929
// ============================== Per-byte page access ==========================
3030

3131
/** @brief Gets a single value from a page, with data aligned as per the ini file */
32-
byte getPageValue( byte pageNum, /**< [in] The page number to retrieve data from. */
32+
byte getPageValue( uint8_t pageNum, /**< [in] The page number to retrieve data from. */
3333
uint16_t offset /**< [in] The address in the page that should be returned. This is as per the page definition in the ini. */
3434
);
3535

@@ -38,7 +38,7 @@ byte getPageValue( byte pageNum, /**< [in] The page number to retrieve da
3838
*
3939
* @returns true if value set, false otherwise
4040
*/
41-
bool setPageValue( byte pageNum, /**< [in] The page number to update. */
41+
bool setPageValue( uint8_t pageNum, /**< [in] The page number to update. */
4242
uint16_t offset, /**< [in] The offset within the page. */
4343
byte value /**< [in] The new value */
4444
);
@@ -165,7 +165,7 @@ bool setEntityValue(page_iterator_t &entity, /**< [in] The entity to update */
165165
* Initiates iteration over a pages entities.
166166
* Test `entity.type==End` to determine the end of the page.
167167
*/
168-
page_iterator_t page_begin(byte pageNum /**< [in] The page number to iterate over. */);
168+
page_iterator_t page_begin(uint8_t pageNum /**< [in] The page number to iterate over. */);
169169

170170
/**
171171
* Moves the iterator to the next sub-entity on the page

0 commit comments

Comments
 (0)