Skip to content

Instantly share code, notes, and snippets.

View osamaadam's full-sized avatar
🤡

Osama Adam osamaadam

🤡
View GitHub Profile
@osamaadam
osamaadam / Measurements.c
Last active February 12, 2018 21:48
Simple data plugging
#include <stdio.h>
#include <math.h>
#define Ra 4.7 //The constant resistance
#define Ein 10 //Input voltage
#define Rx 1 //True value
int size; //Number of readings you're going to input
void resistance(double *volt, double *resi);
void mean(double *Rb, double *mean);
#include <stdio.h>
int main()
{
int number;
int start;
int end;
printf("Please enter the number: \n");
scanf("%d", &number);
printf("Please enter the start number: \n");
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity uArtTx is
generic(
constant waiting : std_logic_vector (1 downto 0) := "00";
constant startBit : std_logic_vector (1 downto 0) := "01";
constant transmission : std_logic_vector (1 downto 0) := "10";
constant stopBit : std_logic_vector (1 downto 0) := "11"
module sparseMemory();
typedef enum {false, true} boolean;
bit[31:0] highestIndex;
bit[31:0] lowestIndex;
boolean bigMemory[bit[31:0]];
initial begin
for(int i = 0; i < 25; i++) begin
bigMemory[$urandom] = true;
module mbox();
import types::*;
mailbox exp_mb = new();
mailbox act_mb = new();
task stimulus();
#include <reg52.h>
unsigned char xdata loc1 _at_ 0x1000;
unsigned char xdata loc2 _at_ 0x2000;
unsigned char xdata *ptr1;
unsigned char xdata *ptr2;
int main()
{
#include <reg52.h>
sbit errorLed = P1 ^ 0;
sbit initLed = P1 ^ 7;
sbit flashLed = P1 ^ 1;
bit errorSignal = 0x20 ^ 0;
unsigned char xdata initLoc _at_ 0x0000;
unsigned char xdata codeLoc _at_ 0x8000;
void insert(Node *root, int data) {
if (root->right == NULL && data > root->data) {
Node *newNode = (Node *)malloc(sizeof(Node));
newNode->data = data;
root->right = newNode
} else if (root->left == NULL && data < root->data) {
Node *newNode = (Node *)malloc(sizeof(Node));
newNode->data = data;
root->left = newNode
} else if (data > root->data) {
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${default}",
"${workspaceFolder}/vehicle_package_manager/src",
"/home/adam/AUTOSAR/sdks/qemux86/sysroots/i586-poky-linux/usr/include",
"/home/adam/AUTOSAR/sdks/qemux86/sysroots/i586-poky-linux/usr/include/c++/8.2.0",
"/home/adam/AUTOSAR/sdks/qemux86/sysroots/i586-poky-linux/usr/include/c++/8.2.0/i586-poky-linux",