Fun LED stuff

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Committer:
kkleong
Date:
Mon Nov 16 06:17:37 2020 +0000
Revision:
2:1be4e7457636
Parent:
0:e579c6f35abf
Child:
4:69f1e5fa2cb6
Got the boxes to fit with fill and draw

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kkleong 0:e579c6f35abf 1 AREA Program3, CODE, READONLY
kkleong 0:e579c6f35abf 2 GLOBAL getQuad
kkleong 0:e579c6f35abf 3 ; uint32_t getQuad ( uint16_t x, uint16_t y)
kkleong 0:e579c6f35abf 4 getQuad CMP R0, #125
kkleong 0:e579c6f35abf 5 MOVLT R0, #1
kkleong 0:e579c6f35abf 6 MOVGT R0, #2
kkleong 0:e579c6f35abf 7 CMP R1, #160
kkleong 0:e579c6f35abf 8 ADDGT R0, R0, #2
kkleong 0:e579c6f35abf 9 BX LR
kkleong 0:e579c6f35abf 10
kkleong 0:e579c6f35abf 11 GLOBAL swapRedBlue
kkleong 0:e579c6f35abf 12 ; uint32_t swapRedBlue ( uint32_t color)
kkleong 0:e579c6f35abf 13 swapRedBlue MOV R1, R0
kkleong 0:e579c6f35abf 14 MOV R2, R0
kkleong 0:e579c6f35abf 15 MOV R3, R0
kkleong 0:e579c6f35abf 16 MOV R4, R0
kkleong 0:e579c6f35abf 17
kkleong 0:e579c6f35abf 18 LSL R1, R1, #24
kkleong 0:e579c6f35abf 19 LSR R1, R1, #8
kkleong 0:e579c6f35abf 20
kkleong 0:e579c6f35abf 21 LSL R2, R2, #8
kkleong 0:e579c6f35abf 22 LSR R2, R2, #24
kkleong 0:e579c6f35abf 23
kkleong 0:e579c6f35abf 24 LSR R3, R3, #24
kkleong 0:e579c6f35abf 25 LSL R3, R3, #24
kkleong 0:e579c6f35abf 26
kkleong 0:e579c6f35abf 27 LSL R4, R4, #16
kkleong 0:e579c6f35abf 28 LSR R4, R4, #24
kkleong 0:e579c6f35abf 29 LSL R4, R4, #8
kkleong 0:e579c6f35abf 30
kkleong 0:e579c6f35abf 31 ORR R5, R1, R2
kkleong 0:e579c6f35abf 32 ORR R6, R3, R4
kkleong 0:e579c6f35abf 33 ORR R0, R5, R6
kkleong 0:e579c6f35abf 34 BX LR
kkleong 0:e579c6f35abf 35
kkleong 0:e579c6f35abf 36 GLOBAL toggleAlphaMSB
kkleong 0:e579c6f35abf 37 ; uint32_t toggleAlphaMSB ( uint32_t color)
kkleong 0:e579c6f35abf 38 toggleAlphaMSB MVN R1, R0
kkleong 0:e579c6f35abf 39 LSR R1, R1, #24
kkleong 0:e579c6f35abf 40 LSL R1, R1, #24
kkleong 0:e579c6f35abf 41 LSL R0, R0, #8
kkleong 0:e579c6f35abf 42 LSR R0, R0, #8
kkleong 0:e579c6f35abf 43 ORR R0, R0, R1
kkleong 0:e579c6f35abf 44
kkleong 0:e579c6f35abf 45 BX LR
kkleong 0:e579c6f35abf 46
kkleong 0:e579c6f35abf 47 GLOBAL rotateRGBBytes
kkleong 0:e579c6f35abf 48 ; uint32_t rotateRGBBytes ( uint32_t color)
kkleong 2:1be4e7457636 49 rotateRGBBytes MOV R1, R0
kkleong 2:1be4e7457636 50 MOV R2, R0
kkleong 2:1be4e7457636 51 MOV R3, R0
kkleong 2:1be4e7457636 52
kkleong 2:1be4e7457636 53 LSR R1, R1, #24
kkleong 2:1be4e7457636 54 LSL R1, R1, #24
kkleong 2:1be4e7457636 55
kkleong 2:1be4e7457636 56 LSL R2, #8
kkleong 2:1be4e7457636 57 LSR R2, #16
kkleong 2:1be4e7457636 58
kkleong 2:1be4e7457636 59 LSL R3, #24
kkleong 2:1be4e7457636 60 LSR R3, #8
kkleong 2:1be4e7457636 61
kkleong 2:1be4e7457636 62 ORR R0, R1, R2
kkleong 2:1be4e7457636 63 ORR R0, R0, R3
kkleong 0:e579c6f35abf 64 BX LR
kkleong 0:e579c6f35abf 65
kkleong 0:e579c6f35abf 66 GLOBAL setRGBBits
kkleong 0:e579c6f35abf 67 ; uint32_t setRGBBits ( uint32_t color, uint8_t n)
kkleong 0:e579c6f35abf 68 setRGBBits
kkleong 0:e579c6f35abf 69 BX LR
kkleong 0:e579c6f35abf 70
kkleong 0:e579c6f35abf 71
kkleong 0:e579c6f35abf 72 END