Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 151) sorted by relevance

1234567

/TwlSDK-5.1.0/build/libraries/dsp/common/src/
Ddsp_pipe.c117 DSPAddrInARM length; in DSPi_FileIOProc() local
120 DSP_ReadPipe(in, &length, sizeof(length)); in DSPi_FileIOProc()
122 length = DSP_32BIT_TO_ARM(length); in DSPi_FileIOProc()
123 length = DSP_ADDR_TO_ARM(length); in DSPi_FileIOProc()
124 (void)FS_CreateFileFromMemory(file, (void*)addr, length); in DSPi_FileIOProc()
156 DSPWord length; in DSPi_FileIOProc() local
159 DSP_ReadPipe(in, &length, sizeof(length)); in DSPi_FileIOProc()
160 length = DSP_WORD_TO_ARM(length); in DSPi_FileIOProc()
163 length = (DSPWord)MATH_MIN(length, rest); in DSPi_FileIOProc()
164 result = DSP_WORD_TO_DSP(length); in DSPi_FileIOProc()
[all …]
Ddsp_byteaccess.c78 void DSP_LoadData(DSPAddrInARM offset, void *buffer, u32 length) in DSP_LoadData() argument
80 if (length > 0) in DSP_LoadData()
88 length -= 1; in DSP_LoadData()
95 u32 aligned = (u32)(length & ~1); in DSP_LoadData()
107 length -= aligned; in DSP_LoadData()
112 while (length >= 2) in DSP_LoadData()
117 length -= 2; in DSP_LoadData()
121 if (length > 0) in DSP_LoadData()
213 void DSP_StoreData(DSPAddrInARM offset, const void *buffer, u32 length) in DSP_StoreData() argument
215 if (length > 0) in DSP_StoreData()
[all …]
/TwlSDK-5.1.0/build/libraries/wfs/common/src/
Dwfs_format.c48 archive->length = 0; in WFS_LoadTable()
56 archive->region[WFS_TABLE_REGION_FAT].length = MI_LoadLE32(&header->fat.length); in WFS_LoadTable()
58 archive->region[WFS_TABLE_REGION_FNT].length = MI_LoadLE32(&header->fnt.length); in WFS_LoadTable()
66 archive->region[WFS_TABLE_REGION_OV9].length = MI_LoadLE32(&header->main_ovt.length); in WFS_LoadTable()
68 archive->region[WFS_TABLE_REGION_OV7].length = MI_LoadLE32(&header->sub_ovt.length); in WFS_LoadTable()
74 mixed_overlay_count = (archive->region[WFS_TABLE_REGION_OV9].length + in WFS_LoadTable()
75 archive->region[WFS_TABLE_REGION_OV7].length) in WFS_LoadTable()
85 mem_region[i].length = archive->region[i].length; in WFS_LoadTable()
88 mem_region[i].length += mixed_overlay_count * sizeof(WFSFATFormat); in WFS_LoadTable()
90 mem_region[i].length = MATH_ROUNDUP(mem_region[i].length, 32); in WFS_LoadTable()
[all …]
Dwfs_thread.c70 static int WFSi_ReadRomCallback(void *userdata, void *buffer, u32 offset, u32 length) in WFSi_ReadRomCallback() argument
78 if (length > sizeof(CARDRomHeader) - offset) in WFSi_ReadRomCallback()
80 length = sizeof(CARDRomHeader) - offset; in WFSi_ReadRomCallback()
82 MI_CpuCopy8(header + offset, buffer, length); in WFSi_ReadRomCallback()
88 (offset + length > CARD_GetOwnRomHeader()->rom_size))) in WFSi_ReadRomCallback()
90 MI_CpuFill8(buffer, 0x00, length); in WFSi_ReadRomCallback()
97 u32 memlen = length; in WFSi_ReadRomCallback()
102 MI_CpuFill8(buffer, 0x00, length); in WFSi_ReadRomCallback()
104 length -= memlen; in WFSi_ReadRomCallback()
106 if (length > 0) in WFSi_ReadRomCallback()
[all …]
Dwfs_server.c102 const u32 length = MI_LEToH32_BITFIELD(24, msg->arg2); in WFSi_WBTCallback() local
106 offset, length, aid, packet)); in WFSi_WBTCallback()
124 (work->list[index].length == length)) in WFSi_WBTCallback()
145 file->length = length; in WFSi_WBTCallback()
149 NULL, NULL, (int)file->length); in WFSi_WBTCallback()
156 segment->length = (u32)WBT_GetParentPacketLength(work->wbt); in WFSi_WBTCallback()
212 const u32 length = p_prep->own_packet_size; in WFSi_WBTCallback() local
217 segment->offset = file->offset + length * next; in WFSi_WBTCallback()
218 segment->length = MATH_MIN(length, file->length - length * next); in WFSi_WBTCallback()
222 segment->offset = file->offset + length * current; in WFSi_WBTCallback()
[all …]
Dwfs_client.c53 static void WFSi_ReallocBitmap(WFSClientContext *context, int length) in WFSi_ReallocBitmap() argument
55 if (length < 0) in WFSi_ReallocBitmap()
57 length = (int)context->max_file_size; in WFSi_ReallocBitmap()
60 if (context->max_file_size < length) in WFSi_ReallocBitmap()
63 const u32 newsize = WBT_PACKET_BITMAP_SIZE((u32)length, packet); in WFSi_ReallocBitmap()
64 context->max_file_size = (u32)length; in WFSi_ReallocBitmap()
117 const int length = context->block_info_table.block_info[0]->block_size; in WFSi_ReceiveTableSequence() local
118 WFS_DEBUG_OUTPUT(("WBT-INFO(0):done [table-length = %d]", length)); in WFSi_ReceiveTableSequence()
119 context->table->length = (u32)length; in WFSi_ReceiveTableSequence()
120 context->table->buffer = (u8 *)MI_CallAlloc(context->allocator, (u32)length, 1); in WFSi_ReceiveTableSequence()
[all …]
Dwfs_archive.c34 static FSResult WFSi_ArchiveReadCallback(FSArchive *archive, void *buffer, u32 offset, u32 length) in WFSi_ArchiveReadCallback() argument
41 MI_CpuCopy8(&table->buffer[offset], buffer, length); in WFSi_ArchiveReadCallback()
90 u32 length = file->arg.readfile.len; in WFSi_RomArchiveProc() local
91 if (length == 0) in WFSi_RomArchiveProc()
102 WFS_RequestClientRead(context, buffer, offset, length, in WFSi_RomArchiveProc()
189 table->region[WFS_TABLE_REGION_FAT].length, in WFS_ReplaceRomArchive()
191 table->region[WFS_TABLE_REGION_FNT].length, in WFS_ReplaceRomArchive()
196 table->region[WFS_TABLE_REGION_OV9].length); in WFS_ReplaceRomArchive()
200 table->region[WFS_TABLE_REGION_OV7].length); in WFS_ReplaceRomArchive()
/TwlSDK-5.1.0/build/libraries/math/common/src/
Dchecksum.c30 static inline u32 MATHi_Checksum16Update(const void *input, u32 length) in MATHi_Checksum16Update() argument
42 length--; in MATHi_Checksum16Update()
46 while ((length >> 17) > 0) in MATHi_Checksum16Update()
48 length -= (1 << 17); in MATHi_Checksum16Update()
59 for (n = (length >> 1); n > 0; n--) in MATHi_Checksum16Update()
65 if (length & 1) in MATHi_Checksum16Update()
92 void MATH_Checksum16Update(MATHChecksum16Context * context, const void *input, u32 length) in MATH_Checksum16Update() argument
96 sum = MATHi_Checksum16Update(input, length); in MATH_Checksum16Update()
133 static inline u32 MATHi_Checksum8Update(const void *input, u32 length) in MATHi_Checksum8Update() argument
144 length--; in MATHi_Checksum8Update()
[all …]
Ddgt_md5.c300 context->length = 0; in MATH_MD5Init()
315 MATH_MD5Update(MATHMD5Context* context, const void* input, u32 length) in MATH_MD5Update() argument
321 buffer_index = (u32)(context->length & 63); // (length % 64); in MATH_MD5Update()
322 context->length += length; in MATH_MD5Update()
325 if (buffer_space > length) in MATH_MD5Update()
327 if (length > 0) in MATH_MD5Update()
329 MI_CpuCopy8(input, &(context->buffer8[buffer_index]), length); in MATH_MD5Update()
337 length -= buffer_space; in MATH_MD5Update()
339 i = (s32)(length >> 6); // length / 64 in MATH_MD5Update()
347 length &= 63; // length % 64 in MATH_MD5Update()
[all …]
/TwlSDK-5.1.0/build/libraries/card/common/src/
Dcard_utility.c99 void CARDi_ICInvalidateSmart(void *buffer, u32 length, u32 threshold) in CARDi_ICInvalidateSmart() argument
101 if (length >= threshold) in CARDi_ICInvalidateSmart()
107 IC_InvalidateRange((void *)buffer, length); in CARDi_ICInvalidateSmart()
124 void CARDi_DCInvalidateSmart(void *buffer, u32 length, u32 threshold) in CARDi_DCInvalidateSmart() argument
126 if (length >= threshold) in CARDi_DCInvalidateSmart()
132 u32 len = length; in CARDi_DCInvalidateSmart()
139 DC_StoreRange((void *)(pos + length), HW_CACHE_LINE_SIZE); in CARDi_DCInvalidateSmart()
140 length += HW_CACHE_LINE_SIZE; in CARDi_DCInvalidateSmart()
142 DC_InvalidateRange((void *)pos, length); in CARDi_DCInvalidateSmart()
Dcard_hash.c79 u32 length = 0; in CARD_CalcRomHashBufferLength() local
80 length += MATH_ROUNDUP(header->digest_tabel2.length, 32); in CARD_CalcRomHashBufferLength()
81 length += MATH_ROUNDUP(header->digest_table1_size * CARD_ROM_HASH_SECTOR_MAX, 32); in CARD_CalcRomHashBufferLength()
82length += MATH_ROUNDUP(MATH_ROUNDUP(CARD_ROM_HASH_SIZE * header->digest_table2_sectors, CARD_ROM_P… in CARD_CalcRomHashBufferLength()
83 length += MATH_ROUNDUP(sizeof(CARDRomHashSector) * CARD_ROM_HASH_SECTOR_MAX, 32); in CARD_CalcRomHashBufferLength()
84 length += MATH_ROUNDUP(sizeof(CARDRomHashBlock) * CARD_ROM_HASH_BLOCK_MAX, 32); in CARD_CalcRomHashBufferLength()
85 return length; in CARD_CalcRomHashBufferLength()
99 static void CARDi_CompareHash(const void *hash, const void *buffer, u32 length) in CARDi_CompareHash() argument
109 SVC_SHA1Update(&tmpcxt, buffer, length); in CARDi_CompareHash()
125 SVC_CalcHMACSHA1(tmphash, buffer, length, CARDiHmacKey, sizeof(CARDiHmacKey)); in CARDi_CompareHash()
[all …]
/TwlSDK-5.1.0/build/libraries/mi/common.TWL/src/
Dmi_ndma_gxcommand.c33 u32 length; member
85 u32 length = (leftLength > MIi_GX_LENGTH_ONCE)? MIi_GX_LENGTH_ONCE : leftLength; in MI_SendNDmaGXCommand() local
88length, &MIi_NDmaConfig[ndmaNo], MI_NDMA_TIMING_GXFIFO, MI_NDMA_ENABLE ); in MI_SendNDmaGXCommand()
90 leftLength -= length; in MI_SendNDmaGXCommand()
91 currentSrc += length; in MI_SendNDmaGXCommand()
141 MIi_GXNDmaParams.length = commandLength; in MI_SendNDmaGXCommandAsync()
175 u32 length; in MIi_FIFOCallback() local
178 if (MIi_GXNDmaParams.length == 0) in MIi_FIFOCallback()
184length = (MIi_GXNDmaParams.length >= MIi_GX_LENGTH_ONCE) ? MIi_GX_LENGTH_ONCE : MIi_GXNDmaParams.l… in MIi_FIFOCallback()
188 MIi_GXNDmaParams.length -= length; in MIi_FIFOCallback()
[all …]
/TwlSDK-5.1.0/build/demos.TWL/dsp/g711/src/
Dmain.c85 u32 length; in TwlMain() local
95 (FS_ReadFile(file, &length, 4) != 4) || in TwlMain()
96 (FS_ReadFile(file, srcbuf, (s32)length) != length)) in TwlMain()
101 DC_StoreRange(srcbuf, length); in TwlMain()
104 length /= sizeof(u16); in TwlMain()
106 DSP_EncodeG711(encbuf, srcbuf, length, DSP_AUDIO_CODEC_MODE_G711_ALAW); in TwlMain()
110 DSP_DecodeG711(dstbuf, encbuf, length, DSP_AUDIO_CODEC_MODE_G711_ALAW); in TwlMain()
121 …DSP_PlaySound(srcbuf, length*2, FALSE); // Because length is the number of samples, correct it to … in TwlMain()
/TwlSDK-5.1.0/build/libraries/mi/common/src/
Dmi_dma_gxcommand.c32 u32 length; member
85 u32 length = (leftLength > MIi_GX_LENGTH_ONCE) ? MIi_GX_LENGTH_ONCE : leftLength; in MI_SendGXCommand() local
86 MIi_DmaSetParameters(dmaNo, currentSrc, (u32)REG_GXFIFO_ADDR, MI_CNT_SEND32(length), 0); in MI_SendGXCommand()
87 leftLength -= length; in MI_SendGXCommand()
88 currentSrc += length; in MI_SendGXCommand()
138 MIi_GXDmaParams.length = commandLength; in MI_SendGXCommandAsync()
175 u32 length; in MIi_FIFOCallback() local
178 if (MIi_GXDmaParams.length == 0) in MIi_FIFOCallback()
184length = (MIi_GXDmaParams.length >= MIi_GX_LENGTH_ONCE) ? MIi_GX_LENGTH_ONCE : MIi_GXDmaParams.len… in MIi_FIFOCallback()
188 MIi_GXDmaParams.length -= length; in MIi_FIFOCallback()
[all …]
Dmi_secureuncompress.c137 s32 length = flags & 0x7f; in MI_SecureUncompressRL() local
145 length++; in MI_SecureUncompressRL()
146 if ( length > destCount ) in MI_SecureUncompressRL()
151 srcCount -= length; in MI_SecureUncompressRL()
157 destCount -= length; in MI_SecureUncompressRL()
161 } while ( --length > 0 ); in MI_SecureUncompressRL()
167 length += 3; in MI_SecureUncompressRL()
168 if ( length > destCount ) in MI_SecureUncompressRL()
174 destCount -= length; in MI_SecureUncompressRL()
183 } while ( --length > 0 ); in MI_SecureUncompressRL()
[all …]
/TwlSDK-5.1.0/include/nitro/math/
Dcrc.h139 u32 length);
156 u32 length) in MATHi_CRC8UpdateRev() argument
158 MATHi_CRC8Update(table, context, input, length); in MATHi_CRC8UpdateRev()
221 u32 length) in MATH_CRC8Update() argument
223 MATHi_CRC8Update(table, context, input, length); in MATH_CRC8Update()
300 u32 length);
318 u32 length);
380 u32 length) in MATH_CRC16CCITTUpdate() argument
382 MATHi_CRC16Update(table, context, input, length); in MATH_CRC16CCITTUpdate()
445 u32 length) in MATH_CRC16Update() argument
[all …]
/TwlSDK-5.1.0/include/nitro/mi/
Ddevice.h36 typedef int (*MIDeviceReadFunction)(void *userdata, void *buffer, u32 offset, u32 length);
37 typedef int (*MIDeviceWriteFunction)(void *userdata, const void *buffer, u32 offset, u32 length);
87 int MI_ReadDevice(MIDevice *device, void *buffer, u32 offset, u32 length) in MI_ReadDevice() argument
89 return device->Read(device->userdata, buffer, offset, length); in MI_ReadDevice()
105 int MI_WriteDevice(MIDevice *device, const void *buffer, u32 offset, u32 length) in MI_WriteDevice() argument
107 return device->Write(device->userdata, buffer, offset, length); in MI_WriteDevice()
Dallocator.h36 typedef void* (*MIAllocatorAllocFunction)(void *userdata, u32 length, u32 alignment);
86 void* MI_CallAlloc(MIAllocator *allocator, u32 length, u32 alignment) in MI_CallAlloc() argument
88 return allocator->Alloc(allocator->userdata, length, alignment); in MI_CallAlloc()
/TwlSDK-5.1.0/include/nitro/crypto/
Drc4.h68 u32 length,
87 u32 length, in CRYPTO_RC4Decrypt() argument
91 CRYPTO_RC4Encrypt(context, in, length, out); in CRYPTO_RC4Decrypt()
163 u32 length,
183 u32 length, in CRYPTO_RC4FastDecrypt() argument
187 CRYPTO_RC4FastEncrypt(context, in, length, out); in CRYPTO_RC4FastDecrypt()
/TwlSDK-5.1.0/include/twl/camera/ARM9/
Dtransfer.h43 static inline void CAMERA_DmaRecv(u32 dmaNo, void *dest, u32 unit, u32 length) in CAMERA_DmaRecv() argument
45 MI_Camera_NDmaRecv( dmaNo, dest, unit/4, length, FALSE ); in CAMERA_DmaRecv()
61 static inline void CAMERA_DmaRecvAsync(u32 dmaNo, void *dest, u32 unit, u32 length, MINDmaCallback … in CAMERA_DmaRecvAsync() argument
63 MI_Camera_NDmaRecvAsync( dmaNo, dest, unit/4, length, FALSE, callback, arg ); in CAMERA_DmaRecvAsync()
/TwlSDK-5.1.0/build/libraries/gx/ARM9/src/
Dg3.c32 void G3_BeginMakeDL(GXDLInfo *info, void *ptr, u32 length) in G3_BeginMakeDL() argument
35 SDK_ALIGN4_ASSERT(length); in G3_BeginMakeDL()
37 info->length = length; in G3_BeginMakeDL()
88 SDK_ASSERTMSG(((u32)info->curr_cmd - (u32)info->bottom <= info->length), in G3_EndMakeDL()
/TwlSDK-5.1.0/include/nitro/wbt/
Dcontext.h63 PLATFORM_LE8 length; member
181 s32 length; member
316 int WBT_CallPacketSendHook(WBTContext *work, void *buffer, int length, BOOL is_parent);
330 void WBT_CallPacketRecvHook(WBTContext *work, int aid, const void *buffer, int length);
459 int WBT_GetBitmapLength(const WBTContext *work, int length);
584 u32 id, u32 length, in WBT_CreateCommandGET() argument
591 arg->recv_data_size = length; in WBT_CreateCommandGET()
613 const void *buffer, u32 length) in WBT_CreateCommandMSG() argument
617 SDK_MINMAX_ASSERT(length, 0, WBT_SIZE_USER_DATA); in WBT_CreateCommandMSG()
618 arg->size = (u8)length; in WBT_CreateCommandMSG()
[all …]
/TwlSDK-5.1.0/build/libraries/fs/common/src/
Dfs_file.c55 static BOOL FSi_IsValidTransferRegion(const void *buffer, s32 length) in FSi_IsValidTransferRegion() argument
66 else if (length < 0) in FSi_IsValidTransferRegion()
68 OS_TWarning("specified transfer size is minus. (%d)\n", length); in FSi_IsValidTransferRegion()
77 if (length > mainmem_size) in FSi_IsValidTransferRegion()
79 OS_TWarning("specified transfer size is over mainmemory-size. (%d)\n", length); in FSi_IsValidTransferRegion()
169 int length = STD_GetStringLength(str); in FSi_TrimSjisTrailingSlash() local
170 int lastpos = FSi_DecrementSjisPosition(str, length); in FSi_TrimSjisTrailingSlash()
173 length = lastpos; in FSi_TrimSjisTrailingSlash()
174 str[length] = '\0'; in FSi_TrimSjisTrailingSlash()
176 return length; in FSi_TrimSjisTrailingSlash()
[all …]
/TwlSDK-5.1.0/include/twl/dsp/common/
Dpipe.h92 DSPByte length; // Buffer size member
207 void DSP_ReadPipe(DSPPipe *pipe, void *buffer, u16 length);
220 void DSP_WritePipe(DSPPipe *pipe, const void *buffer, u16 length);
249 int DSP_OpenMemoryFile(DSPAddrInARM address, DSPWord32 length);
254 s32 DSP_ReadFile(int port, void *buffer, DSPWord length);
255 s32 DSP_WriteFile(int port, const void *buffer, DSPWord length);
/TwlSDK-5.1.0/build/libraries/fs/common/include/
Dcommand.h43 u32 length; member
50 u32 length; member
80 u32 length; member
130 u32 length; member
203 u32 length; member

1234567