Changeset 525 for trunk/boot
- Timestamp:
- Aug 30, 2018, 10:25:58 PM (6 years ago)
- Location:
- trunk/boot/tsar_mips32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/boot/tsar_mips32/boot_utils.c
r523 r525 222 222 223 223 /////////////////////////////////////////////////////// 224 void boot_memcpy( void * dst, void * src, uint32_t size)224 void boot_memcpy( void * dst, const void * src, uint32_t size ) 225 225 { 226 226 uint32_t * wdst = dst; 227 uint32_t * wsrc = src;227 const uint32_t * wsrc = src; 228 228 229 229 // word-by-word copy if both addresses are word-aligned … … 238 238 239 239 unsigned char * cdst = (unsigned char *)wdst; 240 unsigned char * csrc = (unsigned char *)wsrc;240 const unsigned char * csrc = (const unsigned char *)wsrc; 241 241 242 242 // byte-by-byte copy if: … … 250 250 251 251 //////////////////////////////////////////////////// 252 void boot_memset( void * dst, int val, uint32_t size)252 void boot_memset( void * dst, int val, uint32_t size ) 253 253 { 254 254 val &= 0xFF; -
trunk/boot/tsar_mips32/boot_utils.h
r523 r525 107 107 * @ size : size of memory block to be copied in bytes. 108 108 ****************************************************************************/ 109 void boot_memcpy( void* dest, void* src, uint32_t size);109 void boot_memcpy( void * dest, const void * src, uint32_t size ); 110 110 111 111 /**************************************************************************** … … 116 116 * @ size : size of memory block to be filled in bytes. 117 117 ****************************************************************************/ 118 void boot_memset( void* base, int val, uint32_t size);118 void boot_memset( void * base, int val, uint32_t size ); 119 119 120 120 /**************************************************************************** … … 127 127 * @ returns the converted letter, or 'c' if conversion not possible. 128 128 ****************************************************************************/ 129 static inline unsigned char boot_to_lower( unsigned char c)129 static inline unsigned char boot_to_lower( unsigned char c ) 130 130 { 131 131 return ((c >= 'A') && (c <= 'Z')) ? (c | 0x20) : c; 132 133 132 } // boot_to_lower() 134 133 … … 138 137 * @ returns the converted letter, or 'c' if conversion not possible. 139 138 ****************************************************************************/ 140 static inline unsigned char boot_to_upper( unsigned char c)139 static inline unsigned char boot_to_upper( unsigned char c ) 141 140 { 142 141 return ((c >= 'a') && (c <= 'z')) ? (c & ~(0x20)) : c; 143 144 142 } // boot_to_upper() 145 143
Note: See TracChangeset
for help on using the changeset viewer.