mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-31 09:21:19 +01:00
[board/eZ430-Chronos board/msba2 drivers/cc110x_ng]
* restructured interface functions for cc1100 access
This commit is contained in:
parent
d00b12ef75
commit
ee0e37f8ea
@ -1,5 +1,4 @@
|
||||
SubDir TOP board eZ430-Chronos drivers ;
|
||||
|
||||
UseModule board_common ;
|
||||
|
||||
Module board_common : display.c display1.c ;
|
||||
Module board_display : display.c display1.c ;
|
||||
Module board_cc1100 : cc430-cc1100.c : cc110x_cc430 ;
|
||||
|
||||
66
eZ430-Chronos/drivers/cc430-cc1100.c
Normal file
66
eZ430-Chronos/drivers/cc430-cc1100.c
Normal file
@ -0,0 +1,66 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <cpu.h>
|
||||
#include <irq.h>
|
||||
#include <arch_cc1100.h>
|
||||
|
||||
#warning CC430_CC1100 NOT WORKING
|
||||
/* TODO: defines... */
|
||||
#define CC1100_GDO0 (0)
|
||||
#define CC1100_GDO1 (1)
|
||||
#define CC1100_GDO2 (2)
|
||||
|
||||
int cc1100_get_gdo0(void) {
|
||||
return CC1100_GDO0;
|
||||
}
|
||||
|
||||
int cc1100_get_gdo1(void) {
|
||||
return CC1100_GDO1;
|
||||
}
|
||||
|
||||
int cc1100_get_gdo2(void) {
|
||||
return CC1100_GDO2;
|
||||
}
|
||||
|
||||
void cc1100_before_send(void)
|
||||
{
|
||||
// Disable GDO2 interrupt before sending packet
|
||||
cc1100_gdo2_disable();
|
||||
}
|
||||
|
||||
void cc1100_after_send(void)
|
||||
{
|
||||
// Enable GDO2 interrupt after sending packet
|
||||
cc1100_gdo2_enable();
|
||||
}
|
||||
|
||||
void cc1100_gdo0_enable(void) {
|
||||
}
|
||||
|
||||
void cc1100_gdo0_disable(void) {
|
||||
}
|
||||
|
||||
void cc1100_gdo2_disable(void) {
|
||||
}
|
||||
|
||||
void cc1100_gdo2_enable(void) {
|
||||
}
|
||||
|
||||
void cc1100_init_interrupts(void) {
|
||||
uint8_t state = disableIRQ(); /* Disable all interrupts */
|
||||
restoreIRQ(state); /* Enable all interrupts */
|
||||
}
|
||||
|
||||
interrupt (PORT2_VECTOR) __attribute__ ((naked)) cc1100_isr(void){
|
||||
__enter_isr();
|
||||
/* Check IFG */
|
||||
if (1 == 1) {
|
||||
cc1100_gdo2_irq();
|
||||
}
|
||||
else if (2 == 2) {
|
||||
cc1100_gdo0_irq();
|
||||
} else {
|
||||
puts("cc1100_isr(): unexpected IFG!");
|
||||
}
|
||||
__exit_isr();
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
SubDir TOP board msba2 drivers ;
|
||||
|
||||
Module board_cc1100 : msba2-cc1100.c ;
|
||||
Module board_cc1100 : msba2-cc1100.c : gpioint cc110x_spi ;
|
||||
Module board_hal : msba2-hal.c ;
|
||||
Module board_ltc4150 : msba2-ltc4150.c : gpioint ;
|
||||
Module board_common : msba2-uart0.c : ringbuffer ;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user