Use <string.h> & <3ds/exheader.h>, fix some bugs, etc.

also fix all warnings and use -Werror
This commit is contained in:
TuxSH
2018-05-24 00:55:38 +02:00
parent e6b7dc1dc5
commit d28e961adc
85 changed files with 276 additions and 643 deletions

View File

@@ -7,7 +7,6 @@ This is part of 3ds_pxi, which is licensed under the MIT license (see LICENSE fo
*/
#include "MyThread.h"
#include "memory.h"
static void _thread_begin(void* arg)
{

View File

@@ -6,12 +6,13 @@ main.c
This is part of 3ds_pxi, which is licensed under the MIT license (see LICENSE for details).
*/
#include <string.h>
#include "PXI.h"
#include "common.h"
#include "MyThread.h"
#include "receiver.h"
#include "sender.h"
#include "memory.h"
Handle PXISyncInterrupt = 0, PXITransferMutex = 0;
Handle terminationRequestedEvent = 0;

View File

@@ -1,19 +0,0 @@
/*
memory.c:
Memory functions
(c) TuxSH, 2016-2017
This is part of 3ds_pxi, which is licensed under the MIT license (see LICENSE for details).
*/
#include "memory.h"
//Adpated from CakesFW
void memcpy(void *dest, const void *src, u32 size)
{
u8 *destc = (u8 *)dest;
const u8 *srcc = (const u8 *)src;
for(u32 i = 0; i < size; i++)
destc[i] = srcc[i];
}

View File

@@ -1,13 +0,0 @@
/*
memory.h:
Memory functions
(c) TuxSH, 2016-2017
This is part of 3ds_pxi, which is licensed under the MIT license (see LICENSE for details).
*/
#pragma once
#include <3ds/types.h>
void memcpy(void *dest, const void *src, u32 size);

View File

@@ -6,9 +6,10 @@ receiver.c:
This is part of 3ds_pxi, which is licensed under the MIT license (see LICENSE for details).
*/
#include <string.h>
#include "receiver.h"
#include "PXI.h"
#include "memory.h"
static inline void receiveFromArm9(void)
{

View File

@@ -7,9 +7,10 @@ sender.c
This is part of 3ds_pxi, which is licensed under the MIT license (see LICENSE for details).
*/
#include <string.h>
#include "sender.h"
#include "PXI.h"
#include "memory.h"
Result sendPXICmdbuf(Handle *additionalHandle, u32 serviceId, u32 *buffer)
{