Today I continued working on notifications. Created functions for adding and removing them with nice animations. All in all, I'm quite pleased. :)
I'll a gif with the new notifications.
By the way, if you would like to show Crystal Kingdom your support, you can like its facebook page. :)
Yesterday's update can be found here.
In a case of any questions or suggestions, don't hesitate to contact me here or on twitter. ;)
For more updates, you should follow my twitter account - @PeterLauris and the account of Crystal Kingdom - @CrystalKingdom_.
I seem to be unable to find the documentation regarding interrupts (especially with regard to the generated assembly.) I decided to write a quick C test to figure out what it's expecting. It's interesting, but not surprising, the old toolchain and new toolchain produce interrupts differently.
#include <msp430.h>
#define t_int(i) void __interrupt(i) test_##i() {}
t_int(TRAPINT_VECTOR)
t_int(PORT1_VECTOR)
t_int(PORT2_VECTOR)
t_int(ADC10_VECTOR)
t_int(USCIAB0TX_VECTOR)
t_int(USCIAB0RX_VECTOR)
t_int(TIMER0_A1_VECTOR)
t_int(TIMER0_A0_VECTOR)
t_int(WDT_VECTOR)
t_int(COMPARATORA_VECTOR)
t_int(TIMER1_A1_VECTOR)
t_int(TIMER1_A0_VECTOR)
t_int(NMI_VECTOR)
t_int(RESET_VECTOR)
compiled with:
msp430-elf-gcc -I$MSPGCC/include -mmcu=msp430g2553 -S test_inter.c
It results in (just a snippet):
.balign 2
.global test_TIMER0_A0_VECTOR
.section __interrupt_vector_10,"ax",@progbits
.word test_TIMER0_A0_VECTOR
.text
test_TIMER0_A0_VECTOR:
; start of function
; attributes: interrupt
; framesize_regs: 0
; framesize_locals: 0
; framesize_outgoing: 0
; framesize: 0
; elim ap -> fp 2
; elim fp -> sp 0
; saved regs:(none)
; start of prologue
; end of prologue
; start of epilogue
RETI
.size test_TIMER0_A0_VECTOR, .-test_TIMER0_A0_VECTOR
A similar macro
#define t_int(i) void __attribute__((interrupt(i))) test_##i() {}
for the old toolchain produced:
.p2align 1,0
.global test_TIMER0_A0_VECTOR
.type test_TIMER0_A0_VECTOR,@function
/***********************
* Interrupt Vector 9 Service Routine `test_TIMER0_A0_VECTOR'
***********************/
test_TIMER0_A0_VECTOR:
.global __isr_9
__isr_9:
push r4
mov r1, r4
add #2, r4
pop r4
reti
.Lfe7:
.size test_TIMER0_A0_VECTOR,.Lfe7-test_TIMER0_A0_VECTOR
;; End of function
It's interesting that the new toolchain puts the interrupt in a different section, while the old toolchain has a predefined global that, I'm assuming, the linker knows to look for. Not sure which one I like, but both feel relatively under documented.