Gravar-mail: Brain computer interface learning for systems based on electrocorticography and intracortical microelectrode arrays