View c_cpp_properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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", |
View firstPay.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
View extMem.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
View memcopy.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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() | |
{ |
View mbox.sv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module mbox(); | |
import types::*; | |
mailbox exp_mb = new(); | |
mailbox act_mb = new(); | |
task stimulus(); |
View sparseMemory.sv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
View transmitter.vhd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
View Sec3.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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"); |
View Measurements.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); |