GithubHelp home page GithubHelp logo

freechw / cc1100 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from axelpanda/cc1100

0.0 1.0 0.0 148 KB

library for Texas Instruments CC1100/CC1101/CC1100E

License: GNU General Public License v2.0

C 68.51% C++ 31.49%

cc1100's Introduction

CC1101 Library

for 8051 MCU

usage

#include "CC1100.c"	// Place CC1100.c in your work directory.

initialization

void CpuInit();	// SPI and CPU initialization are included.
void POWER_UP_RESET_CC1100();	// RESET instruction is sent through SPI.
void halRfWriteRfSettings();	// Congigure CC1100 registers.
void halSpiWriteBurstReg(CCxxx0_PATABLE, PaTabel, 8);	// Write in RF Power settings.

send packet

void halRfSendPacket(INT8U *txBuffer, INT8U size);	// The content you want to send is stored where pointer *txBuffer points at and the length of the message is given by size.

enter receiving mode

void setRxMode();	// Call this function immediately after sending packet(s) or you will be unable to receive anything.

check receiving flag

Read GDO0. If GDO0 is high or true, there's something to be received, otherwise low or false.

receive packet

INT8U halRfReceivePacket(INT8U *rxBuffer, INT8U *length);	// The packet you receive will be stored where pointer *rxBuffer points at and the size of the packet will be stored in *length.
// NOTE: DO GIVE A LARGE ENOUGH *length, OR YOUR PACKET WILL BE FLUSHED!

for RaspberryPi

NOTE: BCM2835 (a library by mikem@airspayce) is required.

usage

#include "CC1100.h"	// Place CC1100.h and CC1100.cpp in your work directory.

initialization

void Init();	// CC1100/CC1101 is fully configured by calling this function, including SPI, CPU, executing POWER_UP_RESET_INSTRUCTION and configuring all the registers and RF power settings.

send packet

void halRFSendPacket(uint8_t *txBuffer, uint8_t size);	// The content you want to send is stored in the memory where is pointed by *txBuffer and size is the lengt you want to send.

enter receiving mode

void setRxMode();	// Call this immediately after sending packet(s) or you will be unable to receive anything until you call it.

check receiving flag

uint8_t checkReceiveFlag();	// Check whether there is any packet to be received.

receive packet

uint8_t halRFReceivePacket(uint8_t *rxBuffer, uint8_t *length);	// Receiving packet and storing it where the pointer *rxBuffer points at, and the length of the packet you received will be stored in *length as well as the returning value.
// NOTE: DO NOT USE THIS FUNCTION TO CHECK IF THERE IS PACKET TO BE RECEIVED!

cc1100's People

Contributors

axelpanda avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.