Skip to content

Instantly share code, notes, and snippets.

@kika123
kika123 / ARMCodeTest.c
Created Mar 4, 2016 — forked from Myriachan/ARMCodeTest.c
ARM code support on Windows RT/IoT detection and example.
View ARMCodeTest.c
// ARM code support on Windows RT/IoT detection and example.
// By Myria, 2016/03/03.
#ifndef _M_ARM_NT
#error "This code is for ARMv7-Thumb2 only."
#endif
#define _WIN32_WINNT 0x0602
#include <errno.h>
@kika123
kika123 / vck_1.c
Created Mar 7, 2015
vc4 simple kernel
View vck_1.c
#include <pi.h>
#include <stdio.h>
int main(void) { /* no args passed */
int x = pi_kernel_parameters->r3; /*task number*/
pi_kernel_parameters->r0[x]= pi_kernel_parameters->r1[x]+pi_kernel_parameters->r2[x]; /* compute */
exit(EXIT_SUCCESS); /*exiting */
return 0; /* exit() does nothing with an old buggy version, attempt to fix it */
}