Skip to content

Instantly share code, notes, and snippets.

View jagannath-sahoo's full-sized avatar

JAGANNATH SAHOO jagannath-sahoo

View GitHub Profile
@jagannath-sahoo
jagannath-sahoo / IntelHex Parse
Last active July 18, 2019 11:13
Parsing the Intel hex format
/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdio.h>
#include <stdint.h>
@jagannath-sahoo
jagannath-sahoo / Imp C and OS Questions.txt
Last active July 2, 2019 18:55
Output Questions of C
1)
#include <stdio.h>
int main()
{
int a[4] = {1, 2, 3, 4};
int b[4] = {1, 2, 3, 4};
int n = &b[3] - &a[2];
printf("%d\n", n);
}
@jagannath-sahoo
jagannath-sahoo / ExpertTalk.txt
Created June 19, 2019 10:51
knorr bremse Expert Talk Text
Diagnostics in Braking Systems
EBS(Electronic Braking Systems)
30 ECUs
OBD(On Board Diagnostics)
Check its health
Off Board Diagnostics
A connector tool is connected to the network of ECUs
@jagannath-sahoo
jagannath-sahoo / BootJumpSTM32.txt
Last active June 19, 2019 05:11
Boot Jump Code snippet
/**
* Function to perform jump to system memory boot from user application
* Link: http://www.onarm.com/forum/64128/
* Call function when you want to jump to system memory
*/
void JumpToBootloader(void) {
void (*SysMemBootJump)(void);
/**
* Step: Set system memory address.
@jagannath-sahoo
jagannath-sahoo / CharDriver.c
Created June 1, 2019 12:27
Char Device Driver Example
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <asm/unistd.h>
#include <linux/slab.h>
#include <linux/fs.h>
https://askubuntu.com/questions/645220/unable-to-connect-wifi-ubuntu-14-04-lts-hp-pavilion-network-driver-rtl8723be
sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get update
sudo apt-get install rtlwifi-new-dkms linux-firmware
read() called when data sent from the device to user space
write() called when data sent from user space to the device
http://derekmolloy.ie/writing-a-linux-kernel-module-part-2-a-character-device/
@jagannath-sahoo
jagannath-sahoo / ftrace-cmd.txt
Last active May 24, 2019 03:24
Ftrace from Google
************function_graph******************
********************************************
echo 0 > /sys/kernel/debug/tracing/tracing_on
trace-cmd start -p function_graph -g ip_rcv
trace-cmd stop
cat /sys/kernel/debug/tracing/trace
********************************************
cat tracing_on
echo 1 > tracing_on
@jagannath-sahoo
jagannath-sahoo / Notes
Last active May 17, 2019 17:55
Topics from Today's Class.txt
*****TECH DISCUSSION****
IDEAS for Project
I2C to USB Driver
MODBUS Protocol
Trace Passing System
BACKNET Protocol Building Management system
COAP Protocol
PowerLink Protocol
Zigbee Protocol
/*
* Sample kset and ktype implementation
*
* Copyright (C) 2004-2007 Greg Kroah-Hartman <[email protected]>
* Copyright (C) 2007 Novell Inc.
*
* Released under the GPL version 2 only.
*
*/