Kotlin AVR Atmega8 [Experimental]

Submitted by Dickens A S on Mon, 12/02/2019 - 17:17

This is a small experiment for AVR Atmega8 

GitHubhttps://github.com/dickensas/kotlin-gradle-templates/tree/master/arduino-atmega8

A simple swap function which is possibly re-used inside actual avr "C/C++" code as library

import platform.avr.*
import kotlinx.cinterop.internal.*
import kotlinx.cinterop.*

fun swap(a:uint8_tVar, b:uint8_tVar) = memScoped {
    var temp = a
    a.value = b.value
    b.value = temp.value
}

Still work in prograss

Add new comment