Skip to content

Instantly share code, notes, and snippets.

View mazurio's full-sized avatar

Damian Mazurkiewicz mazurio

View GitHub Profile
#include <18f2420.h>
#device PASS_STRINGS = IN_RAM
#include <18f2420_registers.h>
#fuses INTRC_IO, NOBROWNOUT, NOPROTECT, NOIESO, NOWDT, NOLVP
#use delay(clock=8000000)
#use rs232(baud=7200, xmit=PIN_C6, rcv=PIN_C7, UART1, errors)
/////////////////////////////////////////////////////////////////////////
//// FAT_PIC.C ////
//// ////
//// Driver/Library for a FAT filesystem with a PIC ////
//// ////
//// This Library was designed to resemble standard ANSI C I/O as ////
//// much as possible. There are, however, some caveats to this. ////
//// Please read the comments to make sure the inputs and outputs ////
//// to each function are understood before using anything in ////
//// this library. ////
/////////////////////////////////////////////////////////////////////////
//// MMCSD.c ////
//// ////
//// This is a low-level driver for MMC and SD cards. ////
//// ////
//// --User Functions-- ////
//// ////
//// mmcsd_init(): Initializes the media. ////
//// ////
//// mmcsd_read_byte(a, p) ////
{
"list": [
{
"author": "George R. R. Martin",
"cover": "http://i.imgur.com/8VmUcJX.jpg",
"id": "book2",
"title": "A Storm of Swords"
},
{
"author": "Stephen G. Kochan",
@mazurio
mazurio / PopupMenuHolder
Created February 22, 2014 23:55
Android Popup Menu when using Holders
@Override
public View getView(int p, View convertView, ViewGroup parent)
{
final ViewHolder holder;
if (convertView == null)
{
holder = new ViewHolder();
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.d_item, null);
@POST("/announcements")
Announcement insertAnnouncement(
@Body Announcement announcement,
@Query("auth") String authToken
);
public class Announcement implements Serializable {
public String module_id;
public String user_id;